# Clairaut's Theorem on Higher Order Partial Derivatives

Before we look at Clairaut's Theorem, let's first find the second partial derivatives of the function $z = x^3y + 2xy^2$. To do so, we will begin by finding the first partial derivatives. We note that $\frac{\partial z}{\partial x} = 3x^2y + 2y^2$, and $\frac{\partial z}{\partial y} = x^3 + 4xy$. The four second partial derivatives of are $\frac{\partial^2 z}{\partial x^2} = 6xy$, $\frac{\partial ^2 z}{\partial y \partial x} = 3x^2 + 4y$, $\frac{\partial^2 z}{\partial x \partial y} = 3x^2 + 4y$, and $\frac{\partial^2 z}{\partial y^2} = 4x$.

Notice that $\frac{\partial^2 z}{\partial y \partial x} = 3x^2 + 4y = \frac{\partial ^2 z}{\partial x \partial y}$.

Theorem 1 (Clairaut's Theorem): Let $z = f(x,y)$ be a two variable real-valued function that is defined on a disk $\mathcal D$ that contains the point $(a,b)$. Then if $\frac{\partial^2 z}{\partial y \partial x}$ and $\frac{\partial z^2}{\partial x \partial y}$ are continuous on $\mathcal D$ then $\frac{\partial^2 z}{\partial y \partial x} = \frac{\partial^2 z}{\partial x \partial y}$. |

We now have a condition to greatly reduce our work when computing second partial derivatives provided that they are both continuous on a disk $\mathcal D$ containing such a point.

More generally, if $z = f(x, y)$ is continuous for all of $\mathbb{R}^2$ and so is $\frac{\partial^2 z}{\partial y \partial x}$ and $\frac{\partial ^2 z}{\partial x \partial y}$ then $\frac{\partial ^2 z}{\partial y \partial x} = \frac{\partial ^2 z}{\partial x \partial y}$.

Theorem 1 above can also be generalized for real-valued functions of several variables and for even higher order partial derivatives.

## Example 1

**Let $f(x, y) = xe^x y^3 \cos y$. Find all second partial derivatives for $f$.**

First let's compute the first partial derivatives. We note that $\frac{\partial f}{\partial x} = (e^x + xe^x) y^3 \cos y$, and $\frac{\partial f}{\partial y} = xe^x(3y^2 \cos y - y^3 \sin y)$.

So we have that $\frac{\partial^2 f}{\partial x^2} = e^xy^3 \cos y +(e^x + xe^x) y^3 \cos y$.

Now $\frac{\partial^2 f}{\partial y \partial x} = (e^x + xe^x)(3y^2 \cos y - y^3 \sin y)$. In computing $\frac{\partial^2 f}{\partial x \partial y}$, notice that $f(x,y)$ is a continuous two variable real-valued function since each component of the product is continuous. Therefore by Clairaut's Theorem, $\frac{\partial ^2 f}{\partial x \partial y} = (e^x + xe^x)(3y^2 \cos y - y^3 \sin y)$.

Now lastly, $\frac{\partial^2 f}{\partial y^2} = xe^x([6y \cos y - 3y^2 \sin y] - [3y^2 \sin y + y^3 \cos y])$.