- 14.1: Functions of Several Variables
- A function f:R2→R maps a pair of values (x,y) to a single real number. The three-dimensional coordinate system we have already used is a convenient way to visualize such functions: above each point (x,y) in the x - y plane we graph the point (x,y,z) , where of course z=f(x,y).

- 14.2: Limits and Continuity
- To develop calculus for functions of one variable, we needed to make sense of the concept of a limit, which we needed to understand continuous functions and to define the derivative. Limits involving functions of two variables can be considerably more difficult to deal with; fortunately, most of the functions we encounter are fairly easy to understand.

- 14.3: Partial Differentiation
- A partial derivative of a function of several variables is its derivative with respect to one of those variables, with the others held constant (as opposed to the total derivative, in which all variables are allowed to vary).

- 14.4: The Chain Rule
- Not surprisingly, the same chain rule that was formulated for a function on one variable also works for functions of more than two variables.

- 14.5: Directional Derivatives
- The directional derivative of a multivariate differentiable function along a given vector v at a given point x intuitively represents the instantaneous rate of change of the function, moving through x with a velocity specified by v. It therefore generalizes the notion of a partial derivative, in which the rate of change is taken along one of the curvilinear coordinate curves, all other coordinates being constant.

- 14.6: Higher order Derivatives
- In single variable calculus we saw that the second derivative is often useful: in appropriate circumstances it measures acceleration; it can be used to identify maximum and minimum points; it tells us something about how sharply curved a graph is. Not surprisingly, second derivatives are also useful in the multi-variable case, but again not surprisingly, things are a bit more complicated.

- 14.7: Maxima and minima
- The maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given range (the local or relative extrema) or on the entire domain of a function.

- 14.8: Lagrange Multipliers
- Many applied max/min problems involve finding an extreme value of a function, subject to a constraint . Often this can be done, as we have, by explicitly combining the equations and then finding critical points. There is another approach that is often convenient, the method of Lagrange multipliers.

- 14.E: Partial Differentiation (Exercises)
- These are homework exercises to accompany David Guichard's "General Calculus" Textmap.

*Thumbnail: A graph of (x^2+xy+y^2=z) and (y=1). We want to find the partial derivative at that leaves constant; the corresponding tangent line is parallel to the -axis. (CC BY-SA 3.0; Indeed123).*

## Partial Differentiation of a Tensor

I have doubts in the statement that the partial or ordinary differentiation of tensor is not a tensor. The argument for this is that the partial differentiation of the tensor involves evaluating the transformation matrix at two neighbourhood points (say $P$ and $Q$) in the manifold and by the definition of tensor (the set of quantities that transform according to that rule where transformation matrix is evaluated at a point $P$) this is not the case. Thus, the partial differentiation of tensor is not tensor. Now my doubt is: what if the transformation matrices at those points are equal?

## 14: Partial Differentiation

In this lab we will get more comfortable using some of the symbolic power of Mathematica . In the process we will explore the Chain Rule applied to functions of many variables.

A function is a rule that assigns a single value to every point in space, e.g. w = f ( x , y ) assigns the value w to each point ( x , y ) in two dimensional space. If we define a parametric path x = g ( t ), y = h ( t ), then the function w ( t ) = f ( g ( t ), h ( t )) is univariate along the path. The derivative can be found by either substitution and differentiation,

Let's pick a reasonably grotesque function,

First, define the function for later usage: Now, let's find the derivative of f along the elliptical path , . First, by direct substitution. Find w ( t ) The derivative can then be found using How would you have liked to do that by hand?

Now let's try using the Chain Rule. First, define the path variables: and now let's do the Chain Rule: Notice that this has variables x , y and t . That is because we have not substituted the path in for x and y . To do this, we will use the substitution operation in Mathematica , `/. ->'. Try this to find the final form of : To see that the two methods yield the same answer, try subtracting them and simplifying: If you did everything correctly, the result should be `0.'

Essentially the same procedures work for the multi-variate version of the Chain Rule. Try finding and where r and are polar coordinates, that is and . First, take derivatives after direct substitution for , Then try using the Chain Rule directly,

and then substituting, which in Mathematica can be accomplished using the substitution

Try a couple of homework problems. In particular, you may want to give some of the implicit differentiation problems a whirl.

## 14: Partial Differentiation

In this section we are going to take a look at integrals of rational expressions of polynomials and once again let’s start this section out with an integral that we can already do so we can contrast it with the integrals that we’ll be doing in this section.

So, if the numerator is the derivative of the denominator (or a constant multiple of the derivative of the denominator) doing this kind of integral is fairly simple. However, often the numerator isn’t the derivative of the denominator (or a constant multiple). For example, consider the following integral.

In this case the numerator is definitely not the derivative of the denominator nor is it a constant multiple of the derivative of the denominator. Therefore, the simple substitution that we used above won’t work. However, if we notice that the integrand can be broken up as follows,

then the integral is actually quite simple.

This process of taking a rational expression and decomposing it into simpler rational expressions that we can add or subtract to get the original rational expression is called **partial fraction decomposition**. Many integrals involving rational expressions can be done if we first do partial fractions on the integrand.

So, let’s do a quick review of partial fractions. We’ll start with a rational expression in the form,

where both (Pleft( x ight)) and (Qleft( x ight)) are polynomials and the degree of (Pleft( x ight)) is smaller than the degree of (Qleft( x ight)). Recall that the degree of a polynomial is the largest exponent in the polynomial. Partial fractions can only be done if the degree of the numerator is strictly less than the degree of the denominator. That is important to remember.

So, once we’ve determined that partial fractions can be done we factor the denominator as completely as possible. Then for each factor in the denominator we can use the following table to determine the term(s) we pick up in the partial fraction decomposition.

Notice that the first and third cases are really special cases of the second and fourth cases respectively.

There are several methods for determining the coefficients for each term and we will go over each of those in the following examples.

Let’s start the examples by doing the integral above.

The first step is to factor the denominator as much as possible and get the form of the partial fraction decomposition. Doing this gives,

The next step is to actually add the right side back up.

Now, we need to choose (A) and (B) so that the numerators of these two are equal for every (x). To do this we’ll need to set the numerators equal.

[3x + 11 = Aleft(

Note that in most problems we will go straight from the general form of the decomposition to this step and not bother with actually adding the terms back up. The only point to adding the terms is to get the numerator and we can get that without actually writing down the results of the addition.

At this point we have one of two ways to proceed. One way will always work but is often more work. The other, while it won’t always work, is often quicker when it does work. In this case both will work and so we’ll use the quicker way for this example. We’ll take a look at the other method in a later example.

What we’re going to do here is to notice that the numerators must be equal for *any x* that we would choose to use. In particular the numerators must be equal for (x = - 2) and (x = 3). So, let’s plug these in and see what we get.

[egin

So, by carefully picking the (x)’s we got the unknown constants to quickly drop out. Note that these are the values we claimed they would be above.

At this point there really isn’t a whole lot to do other than the integral.

Recall that to do this integral we first split it up into two integrals and then used the substitutions,

on the integrals to get the final answer.

Before moving onto the next example a couple of quick notes are in order here. First, many of the integrals in partial fractions problems come down to the type of integral seen above. Make sure that you can do those integrals.

There is also another integral that often shows up in these kinds of problems so we may as well give the formula for it here since we are already on the subject.

It will be an example or two before we use this so don’t forget about it.

Now, let’s work some more examples.

We won’t be putting as much detail into this solution as we did in the previous example. The first thing is to factor the denominator and get the form of the partial fraction decomposition.

The next step is to set numerators equal. If you need to actually add the right side together to get the numerator for that side then you should do so, however, it will definitely make the problem quicker if you can do the addition in your head to get,

[

As with the previous example it looks like we can just pick a few values of (x) and find the constants so let’s do that.

[egin

Note that unlike the first example most of the coefficients here are fractions. That is not unusual so don’t get excited about it when it happens.

Again, as noted above, integrals that generate natural logarithms are very common in these problems so make sure you can do them. Also, you were able to correctly do the last integral right? The coefficient of (frac<5><6>) is correct. Make sure that you do the substitution required for the term properly.

This time the denominator is already factored so let’s just jump right to the partial fraction decomposition.

[

In this case we aren’t going to be able to just pick values of (x) that will give us all the constants. Therefore, we will need to work this the second (and often longer) way. The first step is to multiply out the right side and collect all the like terms together. Doing this gives,

[

[left. egin

Note that we used (

Now, let’s take a look at the integral.

In order to take care of the third term we needed to split it up into two separate terms. Once we’ve done this we can do all the integrals in the problem. The first two use the substitution (u = x - 4), the third uses the substitution (v =

Let’s first get the general form of the partial fraction decomposition.

Now, set numerators equal, expand the right side and collect like terms.

Setting coefficient equal gives the following system.

[left. egin

Don’t get excited if some of the coefficients end up being zero. It happens on occasion.

To this point we’ve only looked at rational expressions where the degree of the numerator was strictly less that the degree of the denominator. Of course, not all rational expressions will fit into this form and so we need to take a look at a couple of examples where this isn’t the case.

So, in this case the degree of the numerator is 4 and the degree of the denominator is 3. Therefore, partial fractions can’t be done on this rational expression.

To fix this up we’ll need to do long division on this to get it into a form that we can deal with. Here is the work for that.

So, from the long division we see that,

The first integral we can do easily enough and the second integral is now in a form that allows us to do partial fractions. So, let’s get the general form of the partial fractions for the second integrand.

Setting numerators equal gives us,

[18 = Axleft(

Now, there is a variation of the method we used in the first couple of examples that will work here. There are a couple of values of (x) that will allow us to quickly get two of the three constants, but there is no value of (x) that will just hand us the third.

What we’ll do in this example is pick (x)’s to get the two constants that we can easily get and then we’ll just pick another value of (x) that will be easy to work with (*i.e.* it won’t give large/messy numbers anywhere) and then we’ll use the fact that we also know the other two constants to find the third.

[egin

In the previous example there were actually two different ways of dealing with the (

and the other is to treat it as a linear term in the following way,

which gives the following two terms in the decomposition,

We used the second way of thinking about it in our example. Notice however that the two will give identical partial fraction decompositions. So, why talk about this? Simple. This will work for (

Let’s take a look at one more example.

In this case the numerator and denominator have the same degree. As with the last example we’ll need to do long division to get this into the correct form. We’ll leave the details of that to you to check.

So, we’ll need to partial fraction the second integral. Here’s the decomposition.

Setting numerator equal gives,

[1 = Aleft(

Picking value of (x) gives us the following coefficients.

[egin

Implicit Differentiation and the Second

This is one of over 2,400 courses on OCW. Explore materials for this course in the pages linked along the left.

**MIT OpenCourseWare** is a free & open publication of material from thousands of MIT courses, covering the entire MIT curriculum.

**No enrollment or registration.** Freely browse and use OCW materials at your own pace. There's no signup, and no start or end dates.

**Knowledge is your reward.** Use OCW to guide your own life-long learning, or to teach others. We don't offer credit or certification for using OCW.

**Made for sharing**. Download files for later. Send to friends and colleagues. Modify, remix, and reuse (just remember to cite OCW as the source.)

## 14: Partial Differentiation

In Calculus I and in most of Calculus II we concentrated on functions of one variable. In Calculus III we will extend our knowledge of calculus into functions of two or more variables. Despite the fact that this chapter is about derivatives we will start out the chapter with a section on limits of functions of more than one variable. In the remainder of this chapter we will be looking at differentiating functions of more than one variable. As we will see, while there are differences with derivatives of functions of one variable, if you can do derivatives of functions of one variable you shouldn’t have any problems differentiating functions of more than one variable. You’ll just need to keep one subtlety in mind as we do the work.

Here is a list of topics in this chapter.

Limits – In the section we’ll take a quick look at evaluating limits of functions of several variables. We will also see a fairly quick method that can be used, on occasion, for showing that some limits do not exist.

Partial Derivatives – In this section we will look at the idea of partial derivatives. We will give the formal definition of the partial derivative as well as the standard notations and how to compute them in practice (i.e. without the use of the definition). As you will see if you can do derivatives of functions of one variable you won’t have much of an issue with partial derivatives. There is only one (very important) subtlety that you need to always keep in mind while computing partial derivatives.

Interpretations of Partial Derivatives – In the section we will take a look at a couple of important interpretations of partial derivatives. First, the always important, rate of change of the function. Although we now have multiple ‘directions’ in which the function can change (unlike in Calculus I). We will also see that partial derivatives give the slope of tangent lines to the traces of the function.

Higher Order Partial Derivatives – In the section we will take a look at higher order partial derivatives. Unlike Calculus I however, we will have multiple second order derivatives, multiple third order derivatives, etc. because we are now working with functions of multiple variables. We will also discuss Clairaut’s Theorem to help with some of the work in finding higher order derivatives.

Differentials – In this section we extend the idea of differentials we first saw in Calculus I to functions of several variables.

Chain Rule – In the section we extend the idea of the chain rule to functions of several variables. In particular, we will see that there are multiple variants to the chain rule here all depending on how many variables our function is dependent on and how each of those variables can, in turn, be written in terms of different variables. We will also give a nice method for writing down the chain rule for pretty much any situation you might run into when dealing with functions of multiple variables. In addition, we will derive a very quick way of doing implicit differentiation so we no longer need to go through the process we first did back in Calculus I.

Directional Derivatives – In the section we introduce the concept of directional derivatives. With directional derivatives we can now ask how a function is changing if we allow all the independent variables to change rather than holding all but one constant as we had to do with partial derivatives. In addition, we will define the gradient vector to help with some of the notation and work here. The gradient vector will be very useful in some later sections as well. We will also give a nice fact that will allow us to determine the direction in which a given function is changing the fastest.

## Failure of Clairaut's theorem where both mixed partials are defined but not equal

It is possible to have a function of two variables and a point in the domain of such that both the second-order mixed partial derivatives of exist at , i.e., both the numbers and exist, but they are not equal.

### For a function of two variables overall

It is possible to have a function of two variables such that both the second-order mixed partial derivatives and exist everywhere on but they are not equal as functions, i.e., there exists a point where the values of the second-order mixed partial derivatives are not equal.

## Exercises 14.3

**Ex 14.3.1** Find $f_x$ and $f_y$ where $ds f(x,y)=cos(x^2y)+y^3$. (answer)

**Ex 14.3.2** Find $f_x$ and $f_y$ where $ds f(x,y)=

**Ex 14.3.3** Find $f_x$ and $f_y$ where $ds f(x,y)=e^

**Ex 14.3.4** Find $f_x$ and $f_y$ where $ds f(x,y)=xyln(xy)$. (answer)

**Ex 14.3.5** Find $f_x$ and $f_y$ where $ds f(x,y)=sqrt<1-x^2-y^2>$. (answer)

**Ex 14.3.6** Find $f_x$ and $f_y$ where $ds f(x,y)=x an(y)$. (answer)

**Ex 14.3.7** Find $f_x$ and $f_y$ where $ds f(x,y)=<1over xy>$. (answer)

**Ex 14.3.8** Find an equation for the plane tangent to $ds 2x^2+3y^2-z^2=4$ at $(1,1,-1)$. (answer)

**Ex 14.3.9** Find an equation for the plane tangent to $ds f(x,y)=sin(xy)$ at $(pi,1/2,1)$. (answer)

**Ex 14.3.10** Find an equation for the plane tangent to $ds f(x,y)=x^2+y^3$ at $(3,1,10)$. (answer)

**Ex 14.3.11** Find an equation for the plane tangent to $ds f(x,y)=xln(xy)$ at $(2,1/2,0)$. (answer)

**Ex 14.3.12** Find an equation for the line normal to $ds x^2+4y^2=2z$ at $(2,1,4)$. (answer)

**Ex 14.3.13** Show that the curve $**r**(t) = langleln(t),tln(t),t
angle$ is tangent to the surface $xz^2-yz+cos(xy) = 1$ at the point $(0,0,1)$.

**Ex 14.3.14** Explain in your own words why, when taking a partial derivative of a function of multiple variables, we can treat the variables not being differentiated as constants.

**Ex 14.3.15** Consider a differentiable function, $f(x,y)$. Give physical interpretations of the meanings of $f_x(a,b)$ and $f_y(a,b)$ as they relate to the graph of $f$.

**Ex 14.3.16** In much the same way that we used the tangent line to approximate the value of a function from single variable calculus, we can use the tangent plane to approximate a function from multivariable calculus. Consider the tangent plane found in Exercise 14.3.11. Use this plane to approximate $f(1.98, 0.4)$.

**Ex 14.3.17** Suppose that one of your colleagues has calculated the partial derivatives of a given function, and reported to you that $f_x(x,y)=2x+3y$ and that $f_y(x,y)=4x+6y$. Do you believe them? Why or why not? If not, what answer might you have accepted for $f_y$?

**Ex 14.3.18** Suppose $f(t)$ and $g(t)$ are single variable differentiable functions. Find $partial z/partial x$ and $partial z/partial y$ for each of the following two variable functions.

## 14: Partial Differentiation

User Interface question: (

f(x,y):=x^2y+xy^2

)

How best to enter this second mixed partial derivative into the entry line(?):

For higher order derivatives, you simply add more commas and variables. For the ( frac

You can also mix and match the two, such as:

Is there a short way to test a point (1,2) on the partial with respect to x?

diff((f(x,y),x)|x=1,y=2 doesn't work.

diff((f(x,y),x|x=1,y=2) doesn't work.

diff(f(x,y),x)|assume(x = 1,y = 2) doesn't work.

(diff(f(x,y),x)|(assume(x = 1,y = 2))) doesn't work.

(f(x,y),x)'|x=1,y=2) doesn't work.

None of those work because your syntax is ambiguous. There is no way (from a software point of view) to tell if the substitution should be applied prior to executing the command diff() or after. While we all understand your intended meaning, such is the nature of the where function.

As for syntax, it is usually:

It appears that the where function gives precedence to substitution over evaluation of functions. On the other hand, subst() has reverse precedence.

Thank you for your very informative response, Han!

(Original example): ( f(x,y):=x^2y+xy^2 )

I seem to have omitted in the group of things I did try, that didn't work, was: diff(f(x,y),x)|

The subst() function does work, but somewhat misses the ideal: subst(diff(f(x,y),x),

I'd like to suggest that the authors consider extending the utility value of the "|" where command to include applications like: diff(f(x,y),x)|

Again, thanks, I learn a great deal from these responses, and hopefully can share accordingly, as time goes on.

You can always create an "alias" program file that shortens built-in commands to shorter commands.

EXPORT SS(a,b):=

BEGIN

return subst(a,b)

END

Place all your "macros" in the same file, and they will also appear in the Toobox (under User, next to the Catalog) so you can get there with just a few screen taps.

Backing away from the subject matter to reflect on the intended product purpose, and handheld calculating devices for the classroom market can it be said that requiring a student to learn machine-dependent mathematics, meets the educational goal of learning subject mathematics? I don't think so in this case.

In a class setting, math topics move forward quite quickly. During lecture, little time is given for a diversion of how "this or that" machine interface must be tweaked to accomplish the subject theme. During recitation, interposing the human machine interface (HMI) demands, adds a layer of confusion to the central goal of learning the topic. Finally, during exam time, trying to recall which of the various machine dependencies is most likely to reach the expectations of examination problems, makes for greater overall difficulty and time demands.

Earlier, the " | where " statement was discussed regarding it's limitations: "that's the way it is" must be accommodated by users of the Prime. Accordingly, many examples exist which don't work using that facility. Yet in a blackboard class setting, that is precisely the form used to pass constraints back to the parent expression. Subst()'s syntax is not part of the lecturer's normal math lexicon.

This discussion emphasizes that hand held technology doesn't cross connect with the classroom, easily. HMI, lecture, recitation, and exam, would be ever so much the better if objectives being taught were, in the same way, met by the tools being marketed for them.

Personally, I feel the Prime fails educators, students, and others, in this important particular scenario, and needs more work.

Hi, why don't use the 'template" wich is in my opinion the fastest way ?

Isn't that interesting? In the beginning of my work with this subject, I did use the template key for this.

In the first post, I was trying to find a way to enter second mixed partials: (Largefrac<∂^2f(x,y)><∂x∂y>)

After that, I wanted to find ways to evaluate the expression at a point with respect to x, (or y), and we moved away from the template feature. It migrated to the generic entry line forms because (in other cases) the template resulted in the entry line form, anyway: (f(x,y),x)'|

This generated the responses up to now. So, armed with "such is the limitation of the where command," "your syntax is ambiguous," because of not knowing when to apply (before/after) expression evaluation for a given point, etc., has resulted in my, mostly irrelevant, opinion of the status quo.

Ironically, I guess I hadn't put the last expression into the template, as you did, and it DOES the evaluation (as you discovered), in the manner in which, -I would think-, it should!

You just never know,( or try to remember), what you're going to get when the same expression entered in various ways, produces various results.

Every now and then, diff(f(x,y),x)|

Most other times it triggers ["Invalid | Error: Bad Argument Value"] .

In short, I think this is an area in which the software could be improved. I leave it to those empowered to effect change. Fortunately, in my case, I have time to try lots of things, hopefully finding a workable solution.

I enjoy the Prime, and learn along the way! That's a long way to explain the, "why," but that's it. The template key is normally my first go to.

This is my feeling as well (and similar thoughts in the graphing environment). The capabilities of the Prime is amazing. Parisse is a genius with XCAS and it's implementation. Parrish is a genius period.

DrD's point about how precise one has to be in how an entry is made in Prime is hugely important. For this amazing platform to succeed in the educational market and professional markets, it is critical that the primary mathematically equivalent means of expression be recognized by the Prime in Home, CAS, and graphing modes. The Prime should not be about finding a specific syntax amongst a variety of mathematically correct and equivalent entries.

I hope that as the Prime matures, this problem will be given a high priority. I fear that the market place has this expectation as a starting point. This may make it difficult to get school systems and the professional market that may have rejected the Prime for these reasons to reconsider.

I agree with lrdheat. The prime's CAS is far more powerfull than the HP50G CAS for example, but for now the HP50G seems more homogenous in my opinion despite the lacks of his CAS.

Here is how to do for this with the 50G in RPL :

Note that the equation writer is unable to display the formula 2 and 4 on the stack in 'text book' (despite the fact that this syntax is well documented) but the way of the 50G to handle the paranthesis is more logical.

I agree with Parrise. CAS principles and limitations should be taught in math classes where CAS will be encountered. Ideally, everyone would have to be on the same CAS system. However, I strongly feel that a CAS be designed to accept primary mathematically equivalent entries such as n root, surd, and ^ to be accepted by users, especially your target market. This must also work across the entire platform. home,CAS, graphing.

That said, I'm a huge fan of Prime and it's team!

I'm not too far removed from the point of view expressed by Parisse, except that I've found that no technology (CAS or otherwise) is academically universal.

I have taken math classes where no calcs were allowed, others where computer software Mathcad, Maple, Mathematica, etc. was the recitation support tool, and one trig class (long ago) where my hp48 was coveted by the professor, as he would always ask me for hp 48 solutions to classroom examples, comparing them with his lecture notes.

The most recent class I attended, linear algebra, the prof used only a few mathcad examples, throughout the course. The material covered, if well understood, didn't require hardware. Sometimes problem sets were a little more extensive, but for those, the process of the solution was paramount, with accuracy almost a secondary concern. However, it was always stressed that subject matter was what lecture time was about, unless it was a class with a technology perspective foremost.

In my vocational life, of course, it was accuracy above all, and hp calcs of various models were always near to hand my entire career. Beginning with hp-25, I still use the hp-50g even after retirement!

Lately, I have much more "fun" with the Prime, though! Thanks to Parisse, and Han, I have learned a great deal, possibly the most important being great respect for their efforts, regardless of how fitting the results may be!

## 14: Partial Differentiation

when you hit enter, you can then choose MA1024 and then choose the worksheet

Remember to immediately save it in your own home directory. Once you've copied and saved the worksheet, read through the background on the internet and the background of the worksheet before starting the exercises.

The Maple commands for computing partial derivatives are D and diff . The Getting Started worksheet has examples of how to use these commands to compute partial derivatives.

at the point using the diff command and then again using the D command.

a) Plot the function and the plane on the same graph. Use intervals , , . b) Find the derivative of in the plane. Evaluate this derivative at and then find the equation of the line tangent to the two-dimensional intersection of the plane and at the point . c) Plot the tangent line and the two-dimensional intersection of the plane and on the same graph. Be sure to use and ranges that are consistent with your ranges in part a. d) Does your two-dimensional graph look like the intersection from your three-dimensional graph? Be sure to use the same ranges to properly compare and rotate the 3-D graph.