Main content

## Multivariable calculus

### Unit 2: Lesson 3

Partial derivative and gradient (articles)# Second partial derivatives

A brief overview of second partial derivative, the symmetry of mixed partial derivatives, and higher order partial derivatives.

## Background:

## Generalizing the second derivative

Consider a function with a two-dimensional input, such as

f, left parenthesis, x, comma, y, right parenthesis, equals, x, squared, y, cubed.

Its partial derivatives start fraction, \partial, f, divided by, \partial, x, end fraction and start fraction, \partial, f, divided by, \partial, y, end fraction take in that same two-dimensional input left parenthesis, x, comma, y, right parenthesis:

Therefore, we could also take the partial derivatives

*of the partial derivatives*.These are called

**second partial derivatives**, and the notation is analogous to the start fraction, d, squared, f, divided by, d, x, squared, end fraction notation for the ordinary second derivative in single-variable calculus:Using the f, start subscript, x, end subscript notation for the partial derivative (in this case with respect to x), you might also see these second partial derivatives written like this:

The second partial derivatives which involve multiple distinct input variables, such as f, start subscript, start color #bc2612, y, end color #bc2612, start color #0c7f99, x, end color #0c7f99, end subscript and f, start subscript, start color #0c7f99, x, end color #0c7f99, start color #bc2612, y, end color #bc2612, end subscript, are called "

**mixed partial derivatives**"## Example 1: The full tree

**Problem**: Find all the second partial derivatives of f, left parenthesis, x, comma, y, right parenthesis, equals, sine, left parenthesis, x, right parenthesis, y, squared

**Solution**: First, find both partial derivatives:

Then for each one, write both partial derivatives:

## Symmetry of second derivatives

Notice, in the example above, the two mixed partial derivatives start fraction, \partial, squared, f, divided by, \partial, x, \partial, y, end fraction and start fraction, \partial, squared, f, divided by, \partial, y, \partial, x, end fraction are the same. This is not a coincidence; it happens for almost every function you encounter in practice. For example, look at what happens to a general polynomial term x, start superscript, n, end superscript, y, start superscript, k, end superscript:

Technically, the symmetry of second derivatives is not always true. There is a theorem, referred to variously as Schwarz's theorem or Clairaut's theorem, which states that symmetry of second derivatives will always hold at a point if the second partial derivatives are

*continuous*around that point. To really get into the meat of this, we'd need some real analysis.You should keep in the back of your mind that exceptions exist, but the symmetry of second derivatives work for just about every "normal" looking function that you will come across.

## Example 2: Higher order derivatives

Why stop at second partial derivatives? We could also take, say, five partial derivatives with respect to various input variables.

**Problem**: If f, left parenthesis, x, comma, y, comma, z, right parenthesis, equals, sine, left parenthesis, x, y, right parenthesis, e, start superscript, x, plus, z, end superscript, what is f, start subscript, z, y, z, y, x, end subscript?

**Solution**: The notation f, start subscript, z, y, z, y, x, end subscript is shorthand for left parenthesis, left parenthesis, left parenthesis, left parenthesis, f, start subscript, z, end subscript, right parenthesis, start subscript, y, end subscript, right parenthesis, start subscript, z, end subscript, right parenthesis, start subscript, y, end subscript, right parenthesis, start subscript, x, end subscript, so we differentiate with respect to z, then with respect to y, then z, then y, then x. That is, we read

**left to right**.

It's worth pointing out that the order is different in the other notation:

So the order of differentiation is indicated by the order of the terms in the denominator from

**right to left**.Anyway, back to the problem at hand. This is one of those tasks where you just have to roll up your sleeves and slog through it, but to help things let's color the variables start color #11accd, x, end color #11accd, comma, start color #e84d39, y, end color #e84d39, comma, start color #0d923f, z, end color #0d923f to keep track of where they all are:

This last step uses the extended product rule,

Man! That was a tedious example. But if you could follow all the way through, computing multiple partial derivatives should not be an issue for you. It's one of those things that just requires more bookkeeping than anything else.

## Want to join the conversation?

- In example 2 - step 4 (f_zyzy), why does e^(x+z) change to e^(x+y)?(6 votes)
- Typo in tree? f_xx = -sin(x).y^2(3 votes)
- f(x,y) = xy e^y , show that f_xy=fyx.(2 votes)
- f_x=(ye^y)1 and thus f_xy=(1e^y)+(ye^y)

f_y=x((1e^y)+(ye^y)) and thus f_yx= ((1e^y)+(ye^y))

Thus f_xy=f_yx(1 vote)

- Why is e^x+z multiplied by x when we are taking a derivative with respect to y? Isn't x considered a constant and therefore the derivative of e^x+z be equal to e^x+z ?(2 votes)
- The x is coming from the derivative in respect to y of sin(xy) being cos(xy)x through the chain rule. It's confusing I know(1 vote)

- sorry.... shouldn't the final solution include 2x, not x^2? Why did it change back to x^2?(2 votes)
- It does seem confusing but it's part of the power rule. The solution is a big equation

(-cos(xy)y(x^2)(e^x+z)) + (-sin(xy)2x(e^x+z)) + (-sin(xy)(x^2)(e^x+z))(1 vote)

- f(x,y)=xy e^y , show that fxy=fyx.(1 vote)
- I'm working through my old maths book.

It has a question on partial derivatives: If z=f(y/x) show that:

x^2(d^2z/dx^2) + 2xy(d^2z/dxdy) + Y^2(d^2z/dy^2) = 0

I found it to be true for any f(y/x), but I don't understand why this is?(1 vote) - What are some examples when you would take second partial derivatives with respect to different variables? I'm trying to get a hang of what that represents.(0 votes)
- I would very much appreciate at least some geometric or visual component to this article because doing algebra's relatively easy but understanding what it actually means to take the partial derivative with respect to y of the partial derivative with respect to x of a function is not super clear to me(0 votes)
- http://facstaff.cbu.edu/wschrein/media/M232%20Notes/M232L73.pdf Gives an example. It essentially looks at how the slope of the tangent line changes as you go in some direction. (In case this is helpful, the original function in that example appears to be the function for the unit sphere in the first quadrant, x^2+y^2+z^2=1, or f(x,y) = sqrt(1-x^2-y^2))(7 votes)