← Chapter 4 §4.3 Partial Derivatives 偏导数 · Chapter 4 · Differentiation of Functions of Several Variables

Calculus Volume 3 · Chapter 4 · Section 4.3

Partial Derivatives

A surface has a slope in every direction. Freeze all variables but one, and the ordinary derivative gives the slope along that one.

Colour key surface along xx: fxf_x along yy: fyf_y tangent, secant key idea · 3D figures turn when dragged · page links open the textbook

Level 1 · see itSlopes of a surfacebefore any formula

One point, two slopes

A hill z=9x2y2z=\sqrt{9-x^2-y^2}, drawn as a contour map (Figure 4.22). You stand at (1,2)(1,2), height 2.

Step east: the ground drops 12\tfrac12 per step. Step north: it drops 1.

A surface has no single slope. Name a direction first. The two easiest directions give the two partial derivatives.

Level curves z=0,1,2,2.5z=0,1,2,2.5. east: 12-\tfrac12, north: 1-1.

Freeze one variable

  1. f/x\partial f/\partial x, or fxf_x: treat yy as a constant and differentiate in xx (p331).
  2. f/y\partial f/\partial y, or fyf_y: treat xx as a constant. The rounded \partial warns that other variables are standing still.
  3. Example 4.15a: f=x23xy+2y24x+5y12f=x^2-3xy+2y^2-4x+5y-12 gives fx=2x3y4f_x=2x-3y-4 and fy=3x+4y+5f_y=-3x+4y+5 (p332).

In fxf_x, the terms 2y22y^2, 5y5y and 12-12 are constants, so they vanish; 3xy-3xy is 3y-3y times xx.

Slice the surface

Cut the hill with the plane y=2y=2. The cut is a curve, z=5x2z=\sqrt{5-x^2}; its slope at x=1x=1 is fx(1,2)=12f_x(1,2)=-\tfrac12.

Cut with x=1x=1 instead: z=8y2z=\sqrt{8-y^2}, slope fy(1,2)=1f_y(1,2)=-1 (p333).

A partial derivative is the slope of a slice.

Plane y=2y=2: slope 12-\tfrac12. Plane x=1x=1: slope 1-1. Red: the tangent lines through (1,2,2)(1,2,2). Drag to turn.
Level 2 · compute itLimits, rules, second partialsand four labs

Definitions

Partial in x · (4.12) · p330 fx(x,y)=limh0f(x+h,y)f(x,y)h f_x(x,y)=\lim_{h\to0}\frac{f(x+h,y)-f(x,y)}{h}

Only xx moves.

Partial in y · (4.13) fy(x,y)=limk0f(x,y+k)f(x,y)k f_y(x,y)=\lim_{k\to0}\frac{f(x,y+k)-f(x,y)}{k}

Only yy moves.

Three variables · (4.14)–(4.16) · p335

fxf_x, fyf_y, fzf_z: move one of x,y,zx,y,z, freeze the other two.

From a contour map · p333

Rise between two level curves over the run between them: a secant slope.

The limit is the one-variable derivative of g(x)=f(x,b)g(x)=f(x,b); that is why every familiar rule applies.

Examples 4.14–4.20

Examplegivenresult
4.14 · p330x23xy+2y24x+5y12x^2-3xy+2y^2-4x+5y-12, by limitsfx=2x3y4f_x=2x-3y-4, fy=3x+4y+5f_y=-3x+4y+5
4.15 · p332same ff; g=sin(x2y2x+4)g=\sin(x^2y-2x+4)same answers; gx=(2xy2)cos()g_x=(2xy-2)\cos(\cdot), gy=x2cos()g_y=x^2\cos(\cdot)
4.16 · p333g=9x2y2g=\sqrt{9-x^2-y^2}, gxg_x at (5,0)(\sqrt5,0)contour estimate 1.688\approx-1.688; exact 5/21.118-\sqrt5/2\approx-1.118
4.17 · p335x23xy+2y24xz+5yz212x+4y3zx^2-3xy+2y^2-4xz+5yz^2-12x+4y-3zfx=2x3y4z12f_x=2x-3y-4z-12, fy=3x+4y+5z2+4f_y=-3x+4y+5z^2+4, fz=4x+10yz3f_z=-4x+10yz-3
4.18 · p336x2y4xz+y2x3yz\dfrac{x^2y-4xz+y^2}{x-3yz}; sin(x2yz)+cos(x2yz)\sin(x^2y-z)+\cos(x^2-yz)quotient rule; chain rule, e.g. gz=cos(x2yz)+ysin(x2yz)g_z=-\cos(x^2y-z)+y\sin(x^2-yz)
4.19 · p337xe3y+sin(2x5y)xe^{-3y}+\sin(2x-5y)fxx=4sin(2x5y)f_{xx}=-4\sin(2x-5y), fxy=fyx=3e3y+10sin(2x5y)f_{xy}=f_{yx}=-3e^{-3y}+10\sin(2x-5y), fyy=9xe3y25sin(2x5y)f_{yy}=9xe^{-3y}-25\sin(2x-5y)
4.20 · p3395sin(3πx)sin(4πy)cos(10πt)5\sin(3\pi x)\sin(4\pi y)\cos(10\pi t)utt=500π2()=4(uxx+uyy)u_{tt}=-500\pi^2(\cdot)=4(u_{xx}+u_{yy})

Second partials and Clairaut

Four second partials · p337 fxx,fxy=y[fx],fyx,fyy f_{xx},\quad f_{xy}=\frac{\partial}{\partial y}\Big[\frac{\partial f}{\partial x}\Big],\quad f_{yx},\quad f_{yy}

Subscripts read left to right: fxyf_{xy} is xx first, then yy.

Theorem 4.5 · Clairaut

If fxyf_{xy} and fyxf_{yx} are continuous on an open disk around (a,b)(a,b), then

fxy(a,b)=fyx(a,b). f_{xy}(a,b)=f_{yx}(a,b).

Mixed partials measure how the xx-slope changes as you step in yy — and that is the same as how the yy-slope changes as you step in xx.

Partial differential equations

Heat · (4.17) · p339

ut=c2(uxx+uyy)u_t=c^2(u_{xx}+u_{yy})

Wave · (4.18)

utt=c2(uxx+uyy)u_{tt}=c^2(u_{xx}+u_{yy})

Laplace · (4.19)

uxx+uyy=0u_{xx}+u_{yy}=0

A partial differential equation links an unknown function of several variables to its partial derivatives. On a wire, ut=c2uxxu_t=c^2u_{xx} has the solutions um=eπ2m2c2tsin(mπx)u_m=e^{-\pi^2m^2c^2t}\sin(m\pi x) ((4.22)).

To check a solution, compute each partial and substitute; nothing more.

Lab 1 · slice and slope

surface
slope along
1 2

Try: the saddle at a=0a=0 — along xx the slice is a valley, along yy a ridge, both flat at the centre. The slope depends on the point and on the direction; the 2D graph below is the slice laid flat.

Lab 2 · a secant from a contour map

case
0.59

Try: the next level curve (the book's estimate), then shrink hh. A contour map gives a secant; only the limit gives the tangent.

Lab 3 · two orders, one answer

function
0.3
Drag the corner (a,b)(a,b). Corner signs: +++\,-\,-\,+.

Try: the third function with the corner at the origin. x-first and y-first disagree there: the mixed partials exist but are not continuous, so Clairaut does not apply.

Lab 4 · a cooling wire

mode m
0 1
u=eπ2m2c2tsin(mπx)u=e^{-\pi^2m^2c^2t}\sin(m\pi x) over 0x10\le x\le1, 0t0.30\le t\le0.3 (Figure 4.24).

Try: mode 3 against mode 1. A wiggly profile has a large uxxu_{xx}, so ut=c2uxxu_t=c^2u_{xx} makes it fade fast.

Common mistakes

MistakeResultFix
Differentiating the frozen variablefxf_x of 2y22y^2 written as 4y4ya term without xx is a constant: 0
Dropping the inner derivativegx=cos(x2y2x+4)g_x=\cos(x^2y-2x+4)chain rule: times 2xy22xy-2
fxyf_{xy} read as "y first"order swapped when it matterssubscripts left to right; 2f/yx\partial^2 f/\partial y\,\partial x right to left
Contour estimate taken as exact1.688-1.688 for 1.118-1.118it is a secant; differentiate for the tangent
Clairaut used without continuityfxy(0,0)=fyx(0,0)f_{xy}(0,0)=f_{yx}(0,0) "proved" for the counterexamplecheck the hypothesis (p338)
Quotient rule in the wrong ordersign error in Example 4.18a(topbottomtopbottom)/bottom2(\text{top}'\cdot\text{bottom}-\text{top}\cdot\text{bottom}')/\text{bottom}^2

Practice and answers

Exercises from p344; the book's key: p862, p867868.

Checkpoints 4.12–4.18
#taskanswer
4.124x2+2xyy2+3x2y+54x^2+2xy-y^2+3x-2y+5, by limitsfx=8x+2y+3f_x=8x+2y+3, fy=2x2y2f_y=2x-2y-2
4.13tan(x33x2y2+2y4)\tan(x^3-3x^2y^2+2y^4)fx=(3x26xy2)sec2()f_x=(3x^2-6xy^2)\sec^2(\cdot), fy=(6x2y+8y3)sec2()f_y=(-6x^2y+8y^3)\sec^2(\cdot)
4.14x2y2x^2-y^2, fyf_y at (0,2)(0,\sqrt2) from contours323.146\approx-\sqrt3-\sqrt2\approx-3.146; exact 222.828-2\sqrt2\approx-2.828
4.152x24x2y+2y2+5xz26x+3z82x^2-4x^2y+2y^2+5xz^2-6x+3z-8fx=4x8xy+5z26f_x=4x-8xy+5z^2-6, fy=4x2+4yf_y=-4x^2+4y, fz=10xz+3f_z=10xz+3
4.16sec(x2y)tan(x3yz2)\sec(x^2y)-\tan(x^3yz^2)fz=2x3yzsec2(x3yz2)f_z=-2x^3yz\sec^2(x^3yz^2); fxf_x, fyf_y in the key
4.17sin(3x2y)+cos(x+4y)\sin(3x-2y)+\cos(x+4y)fxx=9sin(3x2y)cos(x+4y)f_{xx}=-9\sin(3x-2y)-\cos(x+4y); fxy=fyx=6sin(3x2y)4cos(x+4y)f_{xy}=f_{yx}=6\sin(3x-2y)-4\cos(x+4y); fyy=4sin(3x2y)16cos(x+4y)f_{yy}=-4\sin(3x-2y)-16\cos(x+4y)
4.182sinx3siny4e25t/162\sin\tfrac x3\sin\tfrac y4\,e^{-25t/16} solves ut=9(uxx+uyy)u_t=9(u_{xx}+u_{yy})ut=2516uu_t=-\tfrac{25}{16}u, 9(19116)u=2516u9\big(-\tfrac19-\tfrac1{16}\big)u=-\tfrac{25}{16}u (not in the key)
Exercises
#taskanswerkey step
113zyz_y, z=x23xy+y2z=x^2-3xy+y^2, by limits3x+2y-3x+2yz(x,y+k)z=3xk+2yk+k2z(x,y+k)-z=-3xk+2yk+k^2
115, 117signs from the bowl's graphfx(1,1)<0f_x(-1,1)<0; fx(0,0)=0f_x(0,0)=0slope of the slice
119zyz_y, z=sin3xcos3yz=\sin3x\cos3y3sin(3x)sin(3y)-3\sin(3x)\sin(3y)sin3x\sin3x is a constant
121ln(x6+y4)\ln(x^6+y^4)6x5x6+y4\dfrac{6x^5}{x^6+y^4}, 4y3x6+y4\dfrac{4y^3}{x^6+y^4}chain rule
125tan(2xy)\tan(2x-y)2sec2(2xy)2\sec^2(2x-y), sec2(2xy)-\sec^2(2x-y)inner derivatives 2, −1
127arctan(y/x)\arctan(y/x) at (2,2)(2,-2)fx=fy=14f_x=f_y=\tfrac14fx=y/(x2+y2)f_x=-y/(x^2+y^2)
129zxz_x of excosye^{-x}\cos y at (0,1)(0,1)cos1-\cos1
133cylinder V(r,h)V(r,h)πr2h\pi r^2h; Vr=2πrhV_r=2\pi rh; Vh=πr2V_h=\pi r^2circumference × height; base area
135fxyf_{xy}, z=ln(xy)z=\ln(x-y)1(xy)2\dfrac1{(x-y)^2}zx=(xy)1z_x=(x-y)^{-1}
143fxyzf_{xyz}, x2y3z3xy2z3+5x2zy3zx^2y^3z-3xy^2z^3+5x^2z-y^3z6xy218yz26xy^2-18yz^2one variable at a time
145fx=fy=0f_x=f_y=0, x2+x3xy+y35x^2+x-3xy+y^3-5(14,12)(\tfrac14,\tfrac12), (1,1)(1,1)x=y2x=y^2, then 2y23y+1=02y^2-3y+1=0
147fx=fy=0f_x=f_y=0, y33yx23y23x2+1y^3-3yx^2-3y^2-3x^2+1(0,0),(0,2),(±3,1)(0,0),(0,2),(\pm\sqrt3,-1)fx=6x(y+1)f_x=-6x(y+1)
151etcos(x/c)e^{-t}\cos(x/c) solves zt=c2zxxz_t=c^2z_{xx}c2zxx=etcos(x/c)=ztc^2z_{xx}=-e^{-t}\cos(x/c)=z_tthe key omits the minus sign
159F=x2+y22xycosθF=x^2+y^2-2xy\cos\theta at (2,3,π/6)(2,3,\pi/6)Fθ=6F_\theta=6, Fx=433F_x=4-3\sqrt3Fθ=2xysinθF_\theta=2xy\sin\theta
161200x0.7y0.3200x^{0.7}y^{0.3} at (500,1000)(500,1000)fx172.36f_x\approx172.36, fy36.93f_y\approx36.93140(y/x)0.3140(y/x)^{0.3}, 60(x/y)0.760(x/y)^{0.7}
Level 3 · why it worksWhere the rules come fromshort arguments

Why freezing works

Fix y=by=b and let g(x)=f(x,b)g(x)=f(x,b). Then (p331)

g(a)=limh0g(a+h)g(a)h=limh0f(a+h,b)f(a,b)h=fx(a,b). g'(a)=\lim_{h\to0}\frac{g(a+h)-g(a)}{h}=\lim_{h\to0}\frac{f(a+h,b)-f(a,b)}{h}=f_x(a,b).

A partial derivative is an ordinary derivative of a one-variable function, so the power, product, quotient and chain rules come for free.

When the order does matter

Take f=xy(x2y2)x2+y2f=\dfrac{xy(x^2-y^2)}{x^2+y^2}, f(0,0)=0f(0,0)=0. From the limits, fx(0,y)=yf_x(0,y)=-y and fy(x,0)=xf_y(x,0)=x, so

fxy(0,0)=1,fyx(0,0)=1. f_{xy}(0,0)=-1,\qquad f_{yx}(0,0)=1.

Away from the origin both mixed partials equal

(x2y2)(x4+10x2y2+y4)(x2+y2)3, \frac{(x^2-y^2)(x^4+10x^2y^2+y^4)}{(x^2+y^2)^3},

which has no limit at (0,0)(0,0). Clairaut's continuity hypothesis is exactly what fails.

A smooth-looking surface whose mixed partials disagree at one point.

Why sharp heat dies first

For um=eπ2m2c2tsin(mπx)u_m=e^{-\pi^2m^2c^2t}\sin(m\pi x): ut=π2m2c2uu_t=-\pi^2m^2c^2u and uxx=π2m2uu_{xx}=-\pi^2m^2u, so ut=c2uxxu_t=c^2u_{xx} (Figure 4.24).

With c2=1c^2=1, at t=0.1t=0.1 mode 1 keeps e0.990.37e^{-0.99}\approx0.37 of its height; mode 3 keeps about 0.00010.0001. Decay grows with m2m^2: after a short time only the smoothest mode is left — the reason Kelvin needed only the first terms.

Two slopes make a plane

The two tangent lines at (1,2,2)(1,2,2) have directions 1,0,fx\langle1,0,f_x\rangle and 0,1,fy\langle0,1,f_y\rangle. They span a plane:

z=212(x1)(y2). z=2-\tfrac12(x-1)-(y-2).

If the surface is smooth, this is its tangent plane — §4.4.