# 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

.

Its partial derivatives $\dfrac{\partial f}{\partial x}$ and $\dfrac{\partial f}{\partial y}$ take in that same two-dimensional input :

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 notation for the ordinary second derivative in single-variable calculus:Using the notation for the partial derivative (in this case with respect to ), you might also see these second partial derivatives written like this:

The second partial derivatives which involve multiple distinct input variables, such as and , are called "

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

**Problem**: Find all the second partial derivatives of

**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 $\dfrac{\partial^2 f}{\partial x \partial y}$ and $\dfrac{\partial^2 f}{\partial y \partial x}$ 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 :

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 , what is ?

**Solution**: The notation is shorthand for , so we differentiate with respect to , then with respect to , then , then , then . 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 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.