Math Core

Lesson 3.4 · Partial Derivatives

Tangent planes and linear approximation

In single-variable calculus, zooming in on a smooth curve makes it look like its tangent line, and that line gives quick, accurate estimates near the point of tangency. Zooming in on a smooth surface makes it look like a plane. This lesson finds that tangent plane and uses it the same way: to approximate function values and to estimate how errors in the inputs affect the output.

Building the tangent plane

Let P=(a,b,f(a,b))P = (a, b, f(a, b)) be a point on the surface z=f(x,y)z = f(x, y). Any non-vertical plane through PP has an equation of the form

z−f(a,b)=A(x−a)+B(y−b).z - f(a, b) = A(x - a) + B(y - b).

Which AA and BB make this the tangent plane? Slice with the vertical plane y=by = b. On the plane, the slice is the line z−f(a,b)=A(x−a)z - f(a, b) = A(x - a), with slope AA. On the surface, the slice is the trace z=f(x,b)z = f(x, b), whose slope at x=ax = a is fx(a,b)f_x(a, b). For the plane to be tangent, these slopes must match, so A=fx(a,b)A = f_x(a, b). Slicing with x=ax = a gives B=fy(a,b)B = f_y(a, b) in the same way.

Tangent plane

If ff has continuous partial derivatives near (a,b)(a, b), the tangent plane to z=f(x,y)z = f(x, y) at (a,b,f(a,b))(a, b, f(a, b)) is

z=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b).z = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b).

Compare this with the tangent line y=f(a)+f′(a)(x−a)y = f(a) + f'(a)(x - a). There is one correction term for each variable, and each uses the partial derivative in that variable.

Worked example: Tangent plane to a paraboloid

Find the tangent plane to z=x2+3y2z = x^2 + 3y^2 at the point (1,1,4)(1, 1, 4).

The partials are fx=2xf_x = 2x and fy=6yf_y = 6y, so fx(1,1)=2f_x(1, 1) = 2 and fy(1,1)=6f_y(1, 1) = 6. The tangent plane is

z=4+2(x−1)+6(y−1)=2x+6y−4.z = 4 + 2(x - 1) + 6(y - 1) = 2x + 6y - 4.

Check: at (1,1)(1, 1) the plane gives 2+6−4=42 + 6 - 4 = 4, which matches the surface.

Linear approximation

The function whose graph is the tangent plane is called the linearization of ff at (a,b)(a, b):

L(x,y)=f(a,b)+fx(a,b)(x−a)+fy(a,b)(y−b).L(x, y) = f(a, b) + f_x(a, b)(x - a) + f_y(a, b)(y - b).

For (x,y)(x, y) near (a,b)(a, b), the approximation f(x,y)≈L(x,y)f(x, y) \approx L(x, y) is the linear approximation or tangent plane approximation. It is most useful when f(a,b)f(a, b) and its partials are easy to compute exactly but f(x,y)f(x, y) is not.

Worked example: Estimating a square root

Use a linear approximation to estimate (3.02)2+(3.97)2\sqrt{(3.02)^2 + (3.97)^2}.

Let f(x,y)=x2+y2f(x, y) = \sqrt{x^2 + y^2} and choose the nearby point (3,4)(3, 4), where f(3,4)=5f(3, 4) = 5. The partials are

fx=xx2+y2,fy=yx2+y2,f_x = \frac{x}{\sqrt{x^2 + y^2}}, \qquad f_y = \frac{y}{\sqrt{x^2 + y^2}},

so fx(3,4)=35f_x(3, 4) = \tfrac{3}{5} and fy(3,4)=45f_y(3, 4) = \tfrac{4}{5}. With x−3=0.02x - 3 = 0.02 and y−4=−0.03y - 4 = -0.03:

f(3.02,3.97)≈5+35(0.02)+45(−0.03)=5+0.012−0.024=4.988.f(3.02, 3.97) \approx 5 + \tfrac{3}{5}(0.02) + \tfrac{4}{5}(-0.03) = 5 + 0.012 - 0.024 = 4.988.

A calculator gives 4.98812…4.98812\ldots, so the estimate is off by only about 0.00010.0001.

Differentiability

In one variable, having a derivative is enough for the tangent line to be a good approximation. In two variables, the mere existence of fxf_x and fyf_y is not enough. Partial derivatives only look along two lines, and a function can behave badly in every other direction. The function f(x,y)=xyx2+y2f(x, y) = \dfrac{xy}{x^2 + y^2} (with f(0,0)=0f(0, 0) = 0) from the previous lesson has fx(0,0)=fy(0,0)=0f_x(0, 0) = f_y(0, 0) = 0, since ff is zero on both axes, but it is not even continuous at the origin.

The right condition is differentiability: ff is differentiable at (a,b)(a, b) if the error f(x,y)−L(x,y)f(x, y) - L(x, y) shrinks faster than the distance from (x,y)(x, y) to (a,b)(a, b). You rarely need to check this from scratch because of the following theorem.

A test for differentiability

If fxf_x and fyf_y exist near (a,b)(a, b) and are continuous at (a,b)(a, b), then ff is differentiable at (a,b)(a, b), and the tangent plane approximation is valid there.

Polynomials, exponentials, sines, cosines, and their sums, products and compositions have continuous partials wherever they are defined, so they are differentiable there.

Differentials

Write dx=Δxdx = \Delta x and dy=Δydy = \Delta y for small changes in the inputs. The total differential of z=f(x,y)z = f(x, y) is

dz=fx(x,y) dx+fy(x,y) dy.dz = f_x(x, y)\,dx + f_y(x, y)\,dy.

It is the change in height along the tangent plane, and it approximates the true change Δz=f(x+dx,y+dy)−f(x,y)\Delta z = f(x + dx, y + dy) - f(x, y). Differentials are especially handy for estimating how measurement errors propagate.

Worked example: Error in the volume of a cylinder

A cylinder is measured to have radius 55 cm and height 1010 cm. The radius is actually 0.020.02 cm larger than measured and the height is 0.050.05 cm smaller. Estimate the change in volume.

V=πr2hV = \pi r^2 h, so Vr=2πrhV_r = 2\pi r h and Vh=πr2V_h = \pi r^2. With dr=0.02dr = 0.02 and dh=−0.05dh = -0.05:

dV=2π(5)(10)(0.02)+π(5)2(−0.05)=2π−1.25π=0.75π≈2.36 cm3.dV = 2\pi(5)(10)(0.02) + \pi(5)^2(-0.05) = 2\pi - 1.25\pi = 0.75\pi \approx 2.36 \text{ cm}^3.

When you only know the maximum size of each error, say ∣dx∣≤0.1\lvert dx\rvert \le 0.1 and ∣dy∣≤0.1\lvert dy\rvert \le 0.1, the worst case happens when both terms in dzdz have the same sign. Use absolute values: ∣dz∣≤∣fx∣(0.1)+∣fy∣(0.1)\lvert dz\rvert \le \lvert f_x\rvert(0.1) + \lvert f_y\rvert(0.1).

Common mistake

Evaluate the partial derivatives at the known point (a,b)(a, b), not at the point you are estimating. In the square-root example, fxf_x is evaluated at (3,4)(3, 4), where everything is exact. Plugging (3.02,3.97)(3.02, 3.97) into the partials defeats the purpose and does not give the linear approximation.

Tip

Choose the base point (a,b)(a, b) as the nearest point where ff and its partials are easy to compute by hand: perfect squares under roots, 00 inside exponentials, 11 inside logarithms.

Practice

Practice 1

Find the tangent plane to z=x2yz = x^2 y at (2,1,4)(2, 1, 4). Enter it in the form z=…z = \ldots.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 2

Find the linearization L(x,y)L(x, y) of f(x,y)=excos⁡yf(x, y) = e^x\cos y at (0,0)(0, 0).

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 3

Use the linearization of f(x,y)=xy2f(x, y) = xy^2 at (2,1)(2, 1) to estimate f(2.1,0.9)f(2.1, 0.9).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Use a linear approximation of f(x,y)=ln⁡(x+2y)f(x, y) = \ln(x + 2y) at (1,0)(1, 0) to estimate f(1.04,−0.01)f(1.04, -0.01).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Let z=x3y2z = x^3y^2. Use the differential dzdz to estimate the change in zz when (x,y)(x, y) moves from (1,2)(1, 2) to (1.1,1.95)(1.1, 1.95).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Find the tangent plane to z=3−x2−y2z = 3 - x^2 - y^2 at the point (1,−1,1)(1, -1, 1). Enter it in the form z=…z = \ldots.

Enter an expression, e.g. 3x^2 - 2x + 1

Practice 7

The sides of a rectangle are measured as 2020 cm and 1515 cm, each with a possible error of at most 0.10.1 cm. Use differentials to estimate the maximum possible error in the computed area, in square centimeters.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

Suppose fx(0,0)f_x(0, 0) and fy(0,0)f_y(0, 0) both exist. Which statement is always true?