Skip to main content

CLP-3 Multivariable Calculus

Section 2.3 Higher Order Derivatives

You have already observed, in your first Calculus course, that if f(x) is a function of x, then its derivative, dfdx(x), is also a function of x, and can be differentiated to give the second order derivative d2fdx2(x), which can in turn be differentiated yet again to give the third order derivative, f(3)(x), and so on.
We can do the same for functions of more than one variable. If f(x,y) is a function of x and y, then both of its partial derivatives, fx(x,y) and fy(x,y) are also functions of x and y. They can both be differentiated with respect to x and they can both be differentiated with respect to y. So there are four possible second order derivatives. Here they are, together with various alternate notations.
x(fx)(x,y)=2fx2(x,y)=fxx(x,y)y(fx)(x,y)=2 fyx(x,y)=fxy(x,y)x(fy)(x,y)=2 fxy(x,y)=fyx(x,y)y(fy)(x,y)=2fy2(x,y)=fyy(x,y)
In 2 fyx=2yxf, the derivative closest to f, in this case x, is applied first.
In fxy, the derivative with respect to the variable closest to f, in this case x, is applied first.

Example 2.3.1.

Let f(x,y)=emycos(nx). Then
fx=nemysin(nx)fy=memycos(nx)fxx=n2emycos(nx)fyx=mnemysin(nx)fxy=mnemysin(nx)fyy=m2emycos(nx)

Example 2.3.2.

Let f(x,y)=eαx+βy. Then
fx=αeαx+βyfy=βeαx+βyfxx=α2eαx+βyfyx=βαeαx+βyfxy=αβeαx+βyfyy=β2eαx+βy
More generally, for any integers m,n0,
m+nfxmyn=αmβneαx+βy

Example 2.3.3.

If f(x1,x2,x3,x4)=x14x23x32x4, then
4 fx1x2x3x4=3 x1x2x3(x14x23x32)=2 x1x2(2 x14x23x3)=x1(6 x14x22x3)=24 x13x22x3
and
4 fx4x3x2x1=3 x4x3x2(4x13x23x32x4)=2 x4x3(12 x13x22x32x4)=x4(24 x13x22x3x4)=24 x13x22x3
Notice that in Example 2.3.1,
fxy=fyx=mnemysin(nx)
and in Example 2.3.2
fxy=fyx=αβeαx+βy
and in Example 2.3.3
4 fx1x2x3x4=4 fx4x3x2x1=24 x13x22x3
In all of these examples, it didn’t matter what order we took the derivatives in. The following theorem
 1 
The history of this important theorem is pretty convoluted. See “A note on the history of mixed partial derivatives” by Thomas James Higgins which was published in Scripta Mathematica 7 (1940), 59-62. The Theorem is named for Alexis Clairaut (1713--1765), a French mathematician, astronomer, and geophysicist, and Hermann Schwarz (1843--1921), a German mathematician.
shows that this was no accident.

Subsection 2.3.1 Optional — The Proof of Theorem 2.3.4

Subsubsection 2.3.1.1 Outline

Here is an outline of the proof of Theorem 2.3.4. The (numbered) details are in the subsection below. Fix real numbers x0 and y0 and define
F(h,k)=1hk[f(x0+h,y0+k)f(x0,y0+k)f(x0+h,y0)+f(x0,y0)]
We define F(h,k) in this way because both partial derivatives 2fxy(x0,y0) and 2fyx(x0,y0) are limits of F(h,k) as h,k0. Precisely, we show in item (1) in the details below that
yfx(x0,y0)=limk0limh0F(h,k)xfy(x0,y0)=limh0limk0F(h,k)
Note that the two right hand sides here are identical except for the order in which the limits are taken.
Now, by the mean value theorem (four times),
F(h,k) =(2) 1h[fy(x0+h,y0+θ1k)fy(x0,y0+θ1k)] =(3) xfy(x0+θ2h,y0+θ1k)F(h,k) =(4) 1k[fx(x0+θ3h,y0+k)fx(x0+θ3h,y0)] =(5) yfx(x0+θ3h,y0+θ4k)
for some numbers 0<θ1,θ2,θ3,θ4<1. All of the numbers θ1,θ2,θ3,θ4 depend on x0,y0,h,k. Hence
xfy(x0+θ2h,y0+θ1k)=yfx(x0+θ3h,y0+θ4k)
for all h and k. Taking the limit (h,k)(0,0) and using the assumed continuity of both partial derivatives at (x0,y0) gives
lim(h,k)(0,0)F(h,k)=xfy(x0,y0)=yfx(x0,y0)
as desired. To complete the proof we just have to justify the details (1), (2), (3), (4) and (5).

Subsubsection 2.3.1.2 The Details

  1. By definition,
    yfx(x0,y0)=limk01k[fx(x0,y0+k)fx(x0,y0)]=limk01k[limh0f(x0+h,y0+k)f(x0,y0+k)hlimh0f(x0+h,y0)f(x0,y0)h]=limk0limh0f(x0+h,y0+k)f(x0,y0+k)f(x0+h,y0)+f(x0,y0)hk=limk0limh0F(h,k)
    Similarly,
    xfy(x0,y0)=limh01h[fy(x0+h,y0)fy(x0,y0)]=limh01h[limk0f(x0+h,y0+k)f(x0+h,y0)klimk0f(x0,y0+k)f(x0,y0)k]=limh0limk0f(x0+h,y0+k)f(x0+h,y0)f(x0,y0+k)+f(x0,y0)hk=limh0limk0F(h,k)
  2. The mean value theorem (Theorem 2.13.4 in the CLP-1 text) says that, for any differentiable function φ(x),
    • the slope of the line joining the points (x0,φ(x0)) and (x0+k,φ(x0+k)) on the graph of φ
    is the same as
    • the slope of the tangent to the graph at some point between x0 and x0+k.
    That is, there is some 0<θ1<1 such that
    φ(x0+k)φ(x0)k=dφdx(x0+θ1k)
    Applying this with x replaced by y and φ replaced by G(y)=f(x0+h,y)f(x0,y) gives
    G(y0+k)G(y0)k=dGdy(y0+θ1k)for some 0<θ1<1=fy(x0+h,y0+θ1k)fy(x0,y0+θ1k)
    Hence, for some 0<θ1<1,
    F(h,k) = 1h[G(y0+k)G(y0)k]=1h[fy(x0+h,y0+θ1k)fy(x0,y0+θ1k)]
  3. Define H(x)=fy(x,y0+θ1k). By the mean value theorem,
    F(h,k) = 1h[H(x0+h)H(x0)]= dHdx(x0+θ2h)for some 0<θ2<1=xfy(x0+θ2h,y0+θ1k)
  4. Define A(x)=f(x,y0+k)f(x,y0). By the mean value theorem,
    F(h,k) = 1k[A(x0+h)A(x0)h]= 1kdAdx(x0+θ3h)for some 0<θ3<1=1k[fx(x0+θ3h,y0+k)fx(x0+θ3h,y0)]
  5. Define B(y)=fx(x0+θ3h,y). By the mean value theorem
    F(h,k) = 1k[B(y0+k)B(y0)]= dBdy(y0+θ4k)for some 0<θ4<1=yfx(x0+θ3h,y0+θ4k)
This completes the proof of Theorem 2.3.4.

Subsection 2.3.2 Optional — An Example of 2 fxy(x0,y0)2 fyx(x0,y0)

In Theorem 2.3.4, we showed that 2fxy(x0,y0)=2fyx(x0,y0) if the partial derivatives 2fxy and 2fyx exist and are continuous at (x0,y0). Here is an example which shows that if the partial derivatives 2fxy and 2fyx are not continuous at (x0,y0), then it is possible that 2fxy(x0,y0)2fyx(x0,y0).
Define
f(x,y)={xyx2y2x2+y2if (x,y)(0,0)0if (x,y)=(0,0)
This function is continuous everywhere. Note that f(x,0)=0 for all x and f(0,y)=0 for all y. We now compute the first order partial derivatives. For (x,y)(0,0),
fx(x,y)=yx2y2x2+y2+xy2xx2+y2xy2x(x2y2)(x2+y2)2 =yx2y2x2+y2+xy4xy2(x2+y2)2fy(x,y)=xx2y2x2+y2xy2yx2+y2xy2y(x2y2)(x2+y2)2 =xx2y2x2+y2xy4yx2(x2+y2)2
For (x,y)=(0,0),
fx(0,0)=[ddxf(x,0)]x=0=[ddx0]x=0=0fy(0,0)=[ddyf(0,y)]y=0=[ddy0]y=0=0
By way of summary, the two first order partial derivatives are
fx(x,y)={yx2y2x2+y2+4x2y3(x2+y2)2if (x,y)(0,0)0if (x,y)=(0,0)fy(x,y)={xx2y2x2+y24x3y2(x2+y2)2if (x,y)(0,0)0if (x,y)=(0,0)
Both fx(x,y) and fy(x,y) are continuous. Finally, we compute
2 fxy(0,0)=[ddxfy(x,0)]x=0=limh01h[fy(h,0)fy(0,0)]=limh01h[hh202h2+020]=12 fyx(0,0)=[ddyfx(0,y)]y=0=limk01k[fx(0,k)fx(0,0)]=limk01k[k02k202+k20]=1

Exercises 2.3.3 Exercises

Exercise Group.

Exercises — Stage 1
1.
Let all of the third order partial derivatives of the function f(x,y,z) exist and be continuous. Show that
fxyz(x,y,z)=fxzy(x,y,z)=fyxz(x,y,z)=fyzx(x,y,z)=fzxy(x,y,z)=fzyx(x,y,z)
2.
Find, if possible, a function f(x,y) for which fx(x,y)=ey and fy(x,y)=ex.

Exercise Group.

Exercises — Stage 2
3.
Find the specified partial derivatives.
  1. f(x,y)=x2y3; fxx(x,y), fxyy(x,y), fyxy(x,y)
  2. f(x,y)=exy2; fxx(x,y), fxy(x,y), fxxy(x,y), fxyy(x,y)
  3. f(u,v,w)=1u+2v+3w , 3fuvw(u,v,w) , 3fuvw(3,2,1)
4.
Find all second partial derivatives of f(x,y)=x2+5y2.
5.
Find the specified partial derivatives.
  1. f(x,y,z)=arctan(exy); fxyz(x,y,z)
  2. f(x,y,z)=arctan(exy)+arctan(exz)+arctan(eyz); fxyz(x,y,z)
  3. f(x,y,z)=arctan(exyz); fxx(1,0,0)
6. (✳).
Let f(r,θ)=rmcosmθ be a function of r and θ, where m is a positive integer.
  1. Find the second order partial derivatives frr, frθ, fθθ and evaluate their respective values at (r,θ)=(1,0).
  2. Determine the value of the real number λ so that f(r,θ) satisfies the differential equation
    frr+λrfr+1r2fθθ=0

Exercise Group.

Exercises — Stage 3
7.
Let α>0 be a constant. Show that u(x,y,z,t)=1t3/2e(x2+y2+z2)/(4αt) satisfies the heat equation
ut=α(uxx+uyy+uzz)
for all t>0