If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Second partial derivatives

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

Generalizing the second derivative

Consider a function with a two-dimensional input, such as
f(x,y)=x2y3.
Its partial derivatives fx and fy take in that same two-dimensional input (x,y):
fx=x(x2y3)=2xy3fy=y(x2y3)=3x2y2
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 d2fdx2 notation for the ordinary second derivative in single-variable calculus:
x(fx)=2fx2x(fy)=2fxyy(fx)=2fyxy(fy)=2fy2
Using the fx notation for the partial derivative (in this case with respect to x), you might also see these second partial derivatives written like this:
(fx)x=fxx(fy)x=fyx(fx)y=fxy(fy)y=fyy
The second partial derivatives which involve multiple distinct input variables, such as fyx and fxy, are called "mixed partial derivatives"

Example 1: The full tree

Problem: Find all the second partial derivatives of f(x,y)=sin(x)y2
Solution: First, find both partial derivatives:
x(sin(x)y2)=cos(x)y2y(sin(x)y2)=2sin(x)y
Then for each one, write both partial derivatives:
x(x(sin(x)y2))=x(cos(x)y2)=sin(x)y2x(y(sin(x)y2))=x(2sin(x)y)=2cos(x)yy(x(sin(x)y2))=y(cos(x)y2)=2cos(x)yy(y(sin(x)y2))=y(2sin(x)y)=2sin(x)
sin(x)y2xycos(x)y22sin(x)yxyxysin(x)y22cos(x)y2cos(x)yMixed partial derivatives are the same!2sin(x)

Symmetry of second derivatives

Notice, in the example above, the two mixed partial derivatives 2fxy and 2fyx 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 xnyk:
x(y(xnyk))=x(kxnyk1)=nkxn1yk1y(x(xnyk))=y(nxn1yk)=nkxn1yk1
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(x,y,z)=sin(xy)ex+z, what is fzyzyx?
Solution: The notation fzyzyx is shorthand for ((((fz)y)z)y)x, 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:
xyzyfz=5fx5thy4thz3rdy2ndz1st
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 x,y,z to keep track of where they all are:
f(x,y,z)=sin(xy)ex+zfz(x,y,z)=fz(sin(xy)ex+z)=sin(xy)ex+zfzy(x,y,z)=fy(sin(xy)ex+z)=cos(xy)xex+zfzyz(x,y,z)=fz(cos(xy)xex+z)=cos(xy)xex+zfzyzy(x,y,z)=fy(cos(xy)xex+z)=sin(xy)x2ex+zfzyzyx(x,y,z)=fx(sin(xy)x2ex+z)=cos(xy)yx(sin(xy))x2ex+z=sin(xy)2xxx2ex+z=sin(xy)x2ex+zxex+z
This last step uses the extended product rule,
=ddx(f(x)g(x)h(x))=f(x)g(x)h(x)+f(x)g(x)h(x)+f(x)g(x)h(x)
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?