Clairaut's theorem

...and the meaning of 2nd order derivatives

The point of this topic is to make Clairaut's theorem plausible graphically, and to give you a graphical sense of the meaning of second order derivatives.

What do they mean?

In Calculus I: What are the graphical meanings of

  • $$f'(x)\equiv\frac{df(x)}{dx}=?$$
  • $$f''\equiv\frac{d^2f(x)}{dx^2}=?$$

These mean slope and concavity.

Generalizing to functions of more than one variable...

  • $$f_x\equiv \frac{\del f(x,y)}{\del x}=?$$
  • $$f_{yy}\equiv \frac{\del^2 f(x,y)}{\del y^2}=?$$

Could be something like slope and concavity as you move in the $x$ direction or slope and concavity of a line $z(x)=f(x,c)$ along the surface as $y$ is held constant.

And what about

  • $$f_{yx}\equiv \frac{\del}{\del x}\frac{\del f(x,y)}{\del y}=?$$
$f_{yx}$ visualization (Geogebra): Try setting $f_{yx}$ to a non-zero value, and running $x$ (myx slider) back and forth.

Approximating the change, $\Delta z$ of a function.

Clairaut's theorem deals with continuous functions. A function, $f(x,y)$ has a unique value for the value of the function, given a particular pair of values $(x,y)$ in its domain.

Let's say that we start at the origin, $(x,y)=(0,0)$ and that we have a function whose value is 0 at the origin, $f(0,0)=0$.

We'd like to estimate the value of the function at a different position, (x,y).

If the surface is continuous, we should get the same value of $f(x,y)$ no matter what path we take (in the domain).

Though there are an infinite number of ways to move from (0,0) to (x,y), two that are particularly easy to calculate are these paths, consisting of two straight segments:

  1. Moving from $(0,0)\to (x,0) \to (x,y)$.
  2. Moving from (0,0)->(0,y)->(x,y)

Linear approximation

We could start by using just the values for the slopes, $f_x$ and $f_y$ calculated at the origin. If we change $x$ by $\Delta x$, then the change in the function should be $\Delta f \approx \frac{\del f}{\del x}\Delta x$.

So, using just $f_x$ and $f_y$ and the paths shown, for both paths we get the same result, namely: $$f(x,y)=f(0,0)+f_x x+f_y y=f_x x+f_y y.$$ (Since we assumed $f(0,0)=0$).

Visually (see the Clairaut2 graph with $f_{xy}=f_{yx}=0$.)

This result is exact in the limit of small $x$ and $y$. But to go a bit beyond the linear approximation we might consider using higher order derivatives:

Concavity

We can get a better approximation by using not only the first order derivatives, but also these two second order derivatives $f_{xx}$ and $f_{yy}$.

Now, instead of straight segments, we'll get curved segments. But the value we get for $f(x,y)$ is still the same for both paths: $$f(x,y)\approx f_x x +f_y y +\frac 12 f_{xx}\, x^2 +\frac 12 f_{yy}\,y^2.$$ Even if $f_{xx}$ and $f_{yy}$ take on different values each opposite pair of boundaries of the surface patch has the same profile, and so we'll get to the same $f(x,y)$ on both paths.

$f_{xy}$ and $f_{yx}$

Let's go back, for the sake of simplicity, to forgetting about concavity, and just trying to approximate $f$ using $f_x$, $f_y$, and now $f_{xy}$ and $f_{yx}$, all calculated at the origin.

Now the situation is different along each path. See the Clairaut2 visualization (GeoGebra).

Color-coding the change in $z=f(x,y)$ according to the visualization,...

Along $(0,0)\to(x,0)\to(xy)$ we have $$\begineq f(x,y)&=&\color{#900}{x f_x }+\color{#090}{y (f_y + x f_{yx})} &=&\color{#900}{x f_x }+\color{#090}{y f_y +[yx f_{yx}] } \endeq$$

Along $(0,0)\to(0,y)\to(xy)$ we have $$\begineq f(x,y)&=&\color{#090}{y f_y }+\color{#900}{x (f_x + y f_{xy})} &=&\color{#090}{y f_y }+\color{#900}{x f_x +[xyf_{xy}] } \endeq$$

These two expressions are not the same if $f_{xy}\neq f_{yx}$.

But if $f(x,y)$ is different along two different paths, it is no longer uniquely defined at $(x,y)$, and so it's no longer a continuous function!

So we see that "to keep the neighborhood together" around (0,0), we will need to restrict $f_{xy}=f_{yx}$, which we calculated at (0,0). This is the content of Clairaut's theorem:

Clairaut's theorem

Suppose $f$ is defined[*] on a disk $D$ that contains the point $(a,b)$. If the functions $f_{xy}$ and $f_{yx}$ are both continuous on $D$, then $$f_{xy}(a,b)=f_{yx}(a,b).$$

[*] for $f$ to be defined it must have a uniquely determined value for every point on the disk.

Another way of saying this is $$\frac{\del}{\del y}\left(\frac{\del f}{\del x}\right) =\frac{\del}{\del x}\left(\frac{\del f}{\del y}\right).$$

This notebook explores the nature of $f_{xy}$ and $f_{yx}$ as used to find nearby points on the surface, and suggests a visual way of thinking about them.

Paraphrasing this (and generalizing)... for smoothly varying functions, $f(x,y,w,u,...)$, the order of differentiation does not matter.