Skip to contentSkip to lesson map

Partial Derivatives II

Status
Updates coming
Reading
MMAC Ch 4.6, pp 451-457
Lesson map

Objectives

  1. Using R, compute partial derivatives of a multivariable function.
  2. Obtain higher-order partial derivatives by hand.
  3. Use partial derivatives to obtain a linear approximation of a multivariable function at a point.

1. Partial Derivatives in R

Objective. Using R, compute partial derivatives of a multivariable function.

The R command D(f(x,y) ~ x) returns fxf_x, the partial derivative of f(x,y)f(x,y) with respect to the variable written immediately after the tilde, as a function of every input. The command D(f(x,y) ~ y) returns fyf_y.

After dfx = D(f(x,y) ~ x), evaluate fxf_x at (1,2)(1,2) with dfx(x = 1, y = 2), or with dfx(1, 2), which takes the values in the order xx, yy. A call with an input left out stops with an error:

> dfx(1)
Error in dfx(1) : argument "y" is missing, with no default

Example 1

Use R to compute fxf_x and fyf_y, then evaluate both at (1,2)(1, 2):

f(x,y)=xy2+x3. f(x,y) = xy^2 + x^3.
ShowHide solution

Define ff with makeFun(), compute each first partial derivative with D(), and evaluate both partial derivatives at (1,2)(1,2). Used R.

f = makeFun(x*y^2 + x^3 ~ x & y)
dfx = D(f(x,y) ~ x)
dfy = D(f(x,y) ~ y)
dfx(x = 1, y = 2)
[1] 7
dfy(x = 1, y = 2)
[1] 4

R returns fx(1,2)=7f_x(1,2) = 7 and fy(1,2)=4f_y(1,2) = 4. As a check, the command dfx alone prints the formula R found, 3 * x^2 + y^2, which is fx(x,y)=3x2+y2f_x(x,y) = 3x^2 + y^2 from the derivative rules. The command dfy alone prints 2 * x * y, which is fy(x,y)=2xyf_y(x,y) = 2xy.

Example 2

Use R to compute fx(1,2)f_x(1,2) and fy(1,2)f_y(1,2):

f(x,y)=cos⁡(xy)+x2y3. f(x,y) = \cos(xy) + x^2y^3.
ShowHide solution

Define ff, compute fxf_x and fyf_y with D(), and evaluate both at (1,2)(1,2). Used R.

f = makeFun(cos(x*y) + x^2*y^3 ~ x & y)
dfx = D(f(x,y) ~ x)
dfy = D(f(x,y) ~ y)
dfx(x = 1, y = 2)
[1] 14.18141
dfy(x = 1, y = 2)
[1] 11.0907

R returns fx(1,2)≈14.181f_x(1,2) \approx 14.181 and fy(1,2)≈11.091f_y(1,2) \approx 11.091.

To check by hand, treat yy as a constant and apply the chain rule to cos⁡(xy)\cos(xy):

fx=∂∂x[cos⁡(xy)+x2y3]=−ysin⁡(xy)+2xy3,fx(1,2)=−2sin⁡(2)+2(1)(2)3=16−2sin⁡(2)≈14.181.\begin{align*} f_x &= \frac{\partial}{\partial x}\left[\cos(xy) + x^2y^3\right] = -y\sin(xy) + 2xy^3,\\ f_x(1,2) &= -2\sin(2) + 2(1)(2)^3 = 16 - 2\sin(2) \approx 14.181. \end{align*}

The hand value agrees with the value from R.

Example 3

For f(x,y)=xy2+x3f(x,y) = xy^2 + x^3, plot fxf_x in R for 0≤x≤20 \le x \le 2 with yy held at 1, and determine whether ff increases or decreases in xx when y=1y = 1.

ShowHide solution

Define ff and fxf_x in R, then plot fxf_x with yy held at 1. Used R.

f = makeFun(x*y^2 + x^3 ~ x & y)

dfx = D(f(x,y) ~ x)

plotFun(dfx(x, y = 1) ~ x, xlim = range(0, 2))

In the formula dfx(x, y = 1) ~ x, the argument y = 1 fixes yy at 1, and ~ x puts xx on the horizontal axis.

By hand, treat yy as a constant, differentiate, and then set y=1y = 1:

fx=∂∂x[xy2+x3]=y2+3x2,fx(x,1)=12+3x2=1+3x2.\begin{align*} f_x &= \frac{\partial}{\partial x}\left[xy^2 + x^3\right] = y^2 + 3x^2,\\ f_x(x,1) &= 1^2 + 3x^2 = 1 + 3x^2. \end{align*}

Because 3x2≥03x^2 \ge 0, the partial derivative satisfies fx(x,1)≥1f_x(x,1) \ge 1 for every xx, and the plot stays above the xx-axis. The lowest point of the plot is (0,1)(0, 1), because 3x2=03x^2 = 0 only at x=0x = 0, where fx(0,1)=1f_x(0,1) = 1. The function ff increases in xx when y=1y = 1, because a positive rate of change means an increasing output (Lesson 25 Notes, section 4). As a check, the one-input function f(x,1)=x+x3f(x,1) = x + x^3 rises from f(0,1)=0f(0,1) = 0 to f(2,1)=10f(2,1) = 10.

Figure

Lesson map

2. Higher-Order Partial Derivatives

Objective. Obtain higher-order partial derivatives by hand.

Definition 1 (Higher-order partial derivatives).

A second partial derivative is a partial derivative of a first partial derivative. A higher-order partial derivative is a partial derivative of a partial derivative, and the second partial derivatives are the higher-order partial derivatives of order 2. A two-variable function f(x,y)f(x,y) has four second partial derivatives:

fxx=[fx]x,fxy=[fx]y,fyx=[fy]x,fyy=[fy]y. f_{xx} = [f_x]_x, \qquad f_{xy} = [f_x]_y, \qquad f_{yx} = [f_y]_x, \qquad f_{yy} = [f_y]_y.

The notation [fx]y[f_x]_y means the partial derivative of fxf_x with respect to yy. The order of a partial derivative is the number of differentiations it takes: fxf_x has order 1, fxyf_{xy} has order 2, and fxxyf_{xxy} has order 3.

The first partial derivative fxf_x is neither a second partial derivative nor a higher-order partial derivative, because it is a partial derivative of ff itself, and ff is not a partial derivative. Both definitions require a partial derivative of a partial derivative, such as fxx=[fx]xf_{xx} = [f_x]_x or fxxy=[fxx]yf_{xxy} = [f_{xx}]_y.

As in the textbook, each function in the examples is assumed to have partial derivatives of every order at the points where they are computed.

A mixed partial is a higher-order partial derivative that involves differentiating with respect to different input variables, such as fxyf_{xy} and fyxf_{yx}.

Order of differentiation. In subscript notation, find fxyf_{xy} by differentiating with respect to xx first and then with respect to yy. In Leibniz notation, differentiate first with respect to the rightmost variable in the denominator and work leftward:

∂2f∂y ∂x=fxy. \frac{\partial^2 f}{\partial y\,\partial x} = f_{xy}.

The exponent on ∂\partial in the numerator is the order. For repeated differentiation with respect to one variable, write an exponent on that variable in the denominator:

∂2f∂x2=fxx,∂2f∂y2=fyy. \frac{\partial^2 f}{\partial x^2} = f_{xx}, \qquad \frac{\partial^2 f}{\partial y^2} = f_{yy}.

A multivariable function f(x,y)f(x,y) is smooth on an open region if and only if f(x,y)f(x,y) has continuous partials of all orders at every point of that region.

The common modeling functions are smooth on every open region inside their domains.

Theorem 2 (Clairaut’s theorem).

If f(x,y)f(x,y) is smooth on an open region, then fxy(x,y)=fyx(x,y)f_{xy}(x,y) = f_{yx}(x,y) at every point of that region.

Example 4

For a function f(x,y,z)f(x,y,z), list the order of differentiation for each partial derivative:

fyzx,∂3f∂z ∂y ∂x. f_{yzx}, \qquad\qquad \frac{\partial^3 f}{\partial z\,\partial y\,\partial x}.
ShowHide solution

In fyzxf_{yzx}, the order is yy, then zz, then xx, because subscripts are read left to right. In the partial derivative written in Leibniz notation, the order is xx, then yy, then zz, because the Leibniz denominator is read from the rightmost variable leftward. In subscript notation, that partial derivative is fxyzf_{xyz}.

Example 5

Compute all second partial derivatives of

f(x,y)=xy2+x3. f(x,y) = xy^2 + x^3.
ShowHide solution

By the definition of higher-order partial derivatives, each second partial derivative is a partial derivative of a first one. Compute fxf_x and differentiate it with respect to xx and to yy, then do the same with fyf_y.

Differentiate ff with respect to xx, treating yy as a constant:

fx=∂∂x[xy2+x3]=y2+3x2. f_x = \frac{\partial}{\partial x}\left[xy^2 + x^3\right] = y^2 + 3x^2.

Differentiate fxf_x with respect to xx and then with respect to yy:

fxx=∂∂x[y2+3x2]=6x,fxy=∂∂y[y2+3x2]=2y. f_{xx} = \frac{\partial}{\partial x}\left[y^2 + 3x^2\right] = 6x, \qquad f_{xy} = \frac{\partial}{\partial y}\left[y^2 + 3x^2\right] = 2y.

Differentiate ff with respect to yy, treating xx as a constant:

fy=∂∂y[xy2+x3]=x(2y)+0=2xy. f_y = \frac{\partial}{\partial y}\left[xy^2 + x^3\right] = x(2y) + 0 = 2xy.

Differentiate fyf_y with respect to xx and then with respect to yy:

fyx=∂∂x[2xy]=2y,fyy=∂∂y[2xy]=2x. f_{yx} = \frac{\partial}{\partial x}\left[2xy\right] = 2y, \qquad f_{yy} = \frac{\partial}{\partial y}\left[2xy\right] = 2x.

The mixed partials fxyf_{xy} and fyxf_{yx} both equal 2y2y. Clairaut’s theorem predicts this equality, because a polynomial is smooth everywhere.

Example 6

Compute all second partial derivatives of

g(x,y)=x4sin⁡(y). g(x,y) = x^4\sin(y).
ShowHide solution

As in Example 5, start with gxg_x, where the factor sin⁡(y)\sin(y) is a constant multiple, and differentiate it with respect to xx and then yy:

gx=∂∂x[x4sin⁡(y)]=4x3sin⁡(y),gxx=∂∂x[4x3sin⁡(y)]=12x2sin⁡(y),gxy=∂∂y[4x3sin⁡(y)]=4x3cos⁡(y).\begin{align*} g_x &= \frac{\partial}{\partial x}\bigl[x^4\sin(y)\bigr] = 4x^3\sin(y),\\ g_{xx} &= \frac{\partial}{\partial x}\bigl[4x^3\sin(y)\bigr] = 12x^2\sin(y), \qquad g_{xy} = \frac{\partial}{\partial y}\bigl[4x^3\sin(y)\bigr] = 4x^3\cos(y). \end{align*}

Do the same with gyg_y, where the factor x4x^4 is a constant multiple:

gy=∂∂y[x4sin⁡(y)]=x4cos⁡(y),gyx=∂∂x[x4cos⁡(y)]=4x3cos⁡(y),gyy=∂∂y[x4cos⁡(y)]=−x4sin⁡(y).\begin{align*} g_y &= \frac{\partial}{\partial y}\bigl[x^4\sin(y)\bigr] = x^4\cos(y),\\ g_{yx} &= \frac{\partial}{\partial x}\bigl[x^4\cos(y)\bigr] = 4x^3\cos(y), \qquad g_{yy} = \frac{\partial}{\partial y}\bigl[x^4\cos(y)\bigr] = -x^4\sin(y). \end{align*}

The mixed partials gxyg_{xy} and gyxg_{yx} are equal, as Clairaut’s theorem states for the smooth function x4sin⁡(y)x^4\sin(y).

Example 7

Compute all second partial derivatives of the function below, then compute the third partial derivative ∂3q∂y ∂x2\dfrac{\partial^3 q}{\partial y\,\partial x^2}:

q(x,y)=x3e4y. q(x,y) = x^3e^{4y}.
ShowHide solution

As in Example 5, start with qxq_x, where the factor e4ye^{4y} is a constant multiple, and differentiate it with respect to xx and then yy. The computation of qxyq_{xy} uses ∂∂y[e4y]=4e4y\frac{\partial}{\partial y}\bigl[e^{4y}\bigr] = 4e^{4y} from the chain rule:

qx=∂∂x[x3e4y]=3x2e4y,qxx=∂∂x[3x2e4y]=6xe4y,qxy=∂∂y[3x2e4y]=3x2⋅4e4y=12x2e4y.\begin{align*} q_x &= \frac{\partial}{\partial x}\bigl[x^3e^{4y}\bigr] = 3x^2e^{4y},\\ q_{xx} &= \frac{\partial}{\partial x}\bigl[3x^2e^{4y}\bigr] = 6xe^{4y}, \qquad q_{xy} = \frac{\partial}{\partial y}\bigl[3x^2e^{4y}\bigr] = 3x^2 \cdot 4e^{4y} = 12x^2e^{4y}. \end{align*}

Do the same with qyq_y, where the factor x3x^3 is a constant multiple:

qy=∂∂y[x3e4y]=x3⋅4e4y=4x3e4y,qyx=∂∂x[4x3e4y]=12x2e4y,qyy=∂∂y[4x3e4y]=4x3⋅4e4y=16x3e4y.\begin{align*} q_y &= \frac{\partial}{\partial y}\bigl[x^3e^{4y}\bigr] = x^3 \cdot 4e^{4y} = 4x^3e^{4y},\\ q_{yx} &= \frac{\partial}{\partial x}\bigl[4x^3e^{4y}\bigr] = 12x^2e^{4y}, \qquad q_{yy} = \frac{\partial}{\partial y}\bigl[4x^3e^{4y}\bigr] = 4x^3 \cdot 4e^{4y} = 16x^3e^{4y}. \end{align*}

The coefficient 16 of qyyq_{yy} is 4⋅44 \cdot 4, one factor of 4 from each differentiation with respect to yy.

The Leibniz denominator ∂y ∂x2\partial y\,\partial x^2 read from the right gives the order xx, xx, then yy. The third partial derivative is qxxyq_{xxy}. Differentiate qxxq_{xx} with respect to yy:

qxxy=∂∂y[6xe4y]=6x⋅4e4y=24xe4y. q_{xxy} = \frac{\partial}{\partial y}\bigl[6xe^{4y}\bigr] = 6x \cdot 4e^{4y} = 24xe^{4y}.

Higher-order partial derivatives in R. List the variables of differentiation in order after the tilde, separated by &. The call D(f(x,y) ~ x & y) computes fxyf_{xy}. The call D(f(x,y) ~ x & x) computes fxxf_{xx}.

Example 8

The second partial derivatives of g(x,y)=x4sin⁡(y)g(x,y) = x^4\sin(y) are

gxx=12x2sin⁡(y),gxy=gyx=4x3cos⁡(y),gyy=−x4sin⁡(y). g_{xx} = 12x^2\sin(y), \qquad g_{xy} = g_{yx} = 4x^3\cos(y), \qquad g_{yy} = -x^4\sin(y).

Use R to check them at the point (2,1)(2, 1).

ShowHide solution

Define gg, compute the four second partial derivatives with D() by listing the variables of differentiation in order, and evaluate each at (2,1)(2,1). Used R.

g = makeFun(x^4*sin(y) ~ x & y)
dgxx = D(g(x,y) ~ x & x)
dgxy = D(g(x,y) ~ x & y)
dgyx = D(g(x,y) ~ y & x)
dgyy = D(g(x,y) ~ y & y)
dgxx(x = 2, y = 1)
[1] 40.39061
dgxy(x = 2, y = 1)
[1] 17.28967
dgyx(x = 2, y = 1)
[1] 17.28967
dgyy(x = 2, y = 1)
[1] -13.46354

The R values are gxx(2,1)≈40.391g_{xx}(2,1) \approx 40.391, gxy(2,1)=gyx(2,1)≈17.290g_{xy}(2,1) = g_{yx}(2,1) \approx 17.290, and gyy(2,1)≈−13.464g_{yy}(2,1) \approx -13.464.

Substitute (2,1)(2,1) into the hand formulas. Used calculator.

gxx(2,1)=12(2)2sin⁡(1)=48sin⁡(1)≈40.391,gxy(2,1)=gyx(2,1)=4(2)3cos⁡(1)=32cos⁡(1)≈17.290,gyy(2,1)=−(2)4sin⁡(1)=−16sin⁡(1)≈−13.464.\begin{align*} g_{xx}(2,1) &= 12(2)^2\sin(1) = 48\sin(1) \approx 40.391,\\ g_{xy}(2,1) = g_{yx}(2,1) &= 4(2)^3\cos(1) = 32\cos(1) \approx 17.290,\\ g_{yy}(2,1) &= -(2)^4\sin(1) = -16\sin(1) \approx -13.464. \end{align*}

The hand values match R at (2,1)(2,1), a check on the formulas.

Lesson map

3. Linear Approximation

Objective. Use partial derivatives to obtain a linear approximation of a multivariable function at a point.

Figure

The figure shows the surface z=f(x,y)z = f(x,y) for f(x,y)=x2+y2f(x,y) = x^2 + y^2 and, in orange, the plane tangent to the surface at the point (1,1,2)(1, 1, 2). The point lies on the surface because f(1,1)=12+12=2f(1,1) = 1^2 + 1^2 = 2. From fx=2xf_x = 2x and fy=2yf_y = 2y, the plane’s slope is fx(1,1)=2(1)=2f_x(1,1) = 2(1) = 2 in the xx-direction and fy(1,1)=2(1)=2f_y(1,1) = 2(1) = 2 in the yy-direction. The plane has the equation

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

Around (1,1)(1,1), the plane and the surface nearly coincide. The plane is the graph of the linear approximation, defined next.

Definition 3 (Linear approximation in two inputs).

Let f(x,y)f(x,y) be a smooth function around the point (a,b)(a,b). The linear approximation of f(x,y)f(x,y) when (x,y)=(a,b)(x,y) = (a,b) is given by

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)\cdot(x - a) + f_y(a,b)\cdot(y - b).

The function k(x,y)=∣x∣+yk(x,y) = |x| + y has no linear approximation when (x,y)=(0,0)(x,y) = (0,0), because it is not smooth around (0,0)(0,0): section 2 of the Lesson 37 Notes shows that kx(0,0)k_x(0,0) does not exist. The definition requires a smooth function, and the formula for LL contains kx(0,0)k_x(0,0).

The graph of L(x,y)L(x,y) is a plane, the two-input counterpart of the tangent line of the single-variable linear approximation in section 1 of the Lesson 30 Notes. For inputs near (a,b)(a,b), the linear approximation L(x,y)L(x,y) estimates f(x,y)f(x,y).

Finding a linear approximation.

  1. Compute the first partial derivatives fxf_x and fyf_y.
  2. Evaluate ff, fxf_x, and fyf_y at (a,b)(a,b).
  3. Substitute f(a,b)f(a,b), fx(a,b)f_x(a,b), and fy(a,b)f_y(a,b) into L(x,y)L(x,y) and leave xx and yy as variables.

Example 9

Find the linear approximation of f(x,y)f(x,y) when (x,y)=(1,2)(x,y) = (1,2), and use it to estimate f(1.1,1.9)f(1.1, 1.9):

f(x,y)=xy+exy. f(x,y) = xy + e^{xy}.
ShowHide solution

By the definition of the linear approximation, the linear approximation at (a,b)=(1,2)(a,b) = (1,2) is

L(x,y)=f(1,2)+fx(1,2)⋅(x−1)+fy(1,2)⋅(y−2). L(x,y) = f(1,2) + f_x(1,2)\cdot(x - 1) + f_y(1,2)\cdot(y - 2).

To write the approximation, find the output f(1,2)f(1,2) and the two slopes fx(1,2)f_x(1,2) and fy(1,2)f_y(1,2).

Compute the first partial derivatives. The chain rule gives ∂∂x[exy]=yexy\frac{\partial}{\partial x}\bigl[e^{xy}\bigr] = ye^{xy} and ∂∂y[exy]=xexy\frac{\partial}{\partial y}\bigl[e^{xy}\bigr] = xe^{xy}:

fx=∂∂x[xy+exy]=y+yexy,fy=∂∂y[xy+exy]=x+xexy. f_x = \frac{\partial}{\partial x}\bigl[xy + e^{xy}\bigr] = y + ye^{xy}, \qquad f_y = \frac{\partial}{\partial y}\bigl[xy + e^{xy}\bigr] = x + xe^{xy}.

Evaluate ff, fxf_x, and fyf_y at (1,2)(1,2):

f(1,2)=(1)(2)+e(1)(2)=2+e2,fx(1,2)=2+2e(1)(2)=2+2e2,fy(1,2)=1+1⋅e(1)(2)=1+e2.\begin{align*} f(1,2) &= (1)(2) + e^{(1)(2)} = 2 + e^2,\\ f_x(1,2) &= 2 + 2e^{(1)(2)} = 2 + 2e^2,\\ f_y(1,2) &= 1 + 1 \cdot e^{(1)(2)} = 1 + e^2. \end{align*}

Substitute the three values into the linear approximation:

L(x,y)=(2+e2)+(2+2e2)(x−1)+(1+e2)(y−2). L(x,y) = (2 + e^2) + (2 + 2e^2)(x - 1) + (1 + e^2)(y - 2).

Evaluate LL at (1.1,1.9)(1.1, 1.9), keeping e2e^2 exact until the last step. Used calculator.

L(1.1,1.9)=(2+e2)+(2+2e2)(1.1−1)+(1+e2)(1.9−2)=(2+e2)+(0.2+0.2e2)+(−0.1−0.1e2)=2.1+1.1e2≈10.228.\begin{align*} L(1.1, 1.9) &= (2 + e^2) + (2 + 2e^2)(1.1 - 1) + (1 + e^2)(1.9 - 2)\\ &= (2 + e^2) + (0.2 + 0.2e^2) + (-0.1 - 0.1e^2)\\ &= 2.1 + 1.1e^2 \approx 10.228. \end{align*}

As a check, the actual value is

f(1.1,1.9)=(1.1)(1.9)+e(1.1)(1.9)=2.09+e2.09≈10.175, f(1.1, 1.9) = (1.1)(1.9) + e^{(1.1)(1.9)} = 2.09 + e^{2.09} \approx 10.175,

below the estimate 10.228 by about 0.053.

Example 10

Use R to build the linear approximation of f(x,y)=xy+exyf(x,y) = xy + e^{xy} when (x,y)=(1,2)(x,y) = (1,2), and compute the estimate of f(1.1,1.9)f(1.1, 1.9).

ShowHide solution

Define ff, compute fxf_x and fyf_y with D(), and evaluate all three at (1,2)(1,2). Used R.

f = makeFun(x*y + exp(x*y) ~ x & y)
dfx = D(f(x,y) ~ x)
dfy = D(f(x,y) ~ y)
f(x = 1, y = 2)
[1] 9.389056
dfx(x = 1, y = 2)
[1] 16.77811
dfy(x = 1, y = 2)
[1] 8.389056

As a check by hand, fx=y+yexyf_x = y + ye^{xy} and fy=x+xexyf_y = x + xe^{xy} give f(1,2)=2+e2f(1,2) = 2 + e^2, fx(1,2)=2+2e2f_x(1,2) = 2 + 2e^2, and fy(1,2)=1+e2f_y(1,2) = 1 + e^2, which match R with e2≈7.389056e^2 \approx 7.389056. The linear approximation is

L(x,y)≈9.389+16.778(x−1)+8.389(y−2). L(x,y) \approx 9.389 + 16.778(x - 1) + 8.389(y - 2).

Build LL from the unrounded R values and evaluate it at (1.1,1.9)(1.1, 1.9):

L = makeFun(f(1, 2) + dfx(1, 2)*(x - 1) +
dfy(1, 2)*(y - 2) ~ x & y)
L(x = 1.1, y = 1.9)
[1] 10.22796

The estimate is f(1.1,1.9)≈L(1.1,1.9)≈10.228f(1.1, 1.9) \approx L(1.1, 1.9) \approx 10.228.

Example 11

A linear approximation of a function f(x,y)f(x,y) is

L(x,y)=5−2(x−3)+4(y+1). L(x,y) = 5 - 2(x - 3) + 4(y + 1).

Determine the point (a,b)(a,b) at which LL approximates ff, the value of ff at that point, and whether ff increases or decreases in each input near that point.

ShowHide solution

Rewrite y+1y + 1 as y−(−1)y - (-1) and match the terms to the linear approximation formula:

L(x,y)=5+(−2)⋅(x−3)+4⋅(y−(−1))=f(a,b)+fx(a,b)⋅(x−a)+fy(a,b)⋅(y−b). L(x,y) = 5 + (-2)\cdot(x - 3) + 4\cdot\bigl(y - (-1)\bigr) = f(a,b) + f_x(a,b)\cdot(x - a) + f_y(a,b)\cdot(y - b).

The match gives a=3a = 3 and b=−1b = -1. The linear approximation is taken at (3,−1)(3, -1), where f(3,−1)=5f(3,-1) = 5. Near that point, ff decreases in xx because fx(3,−1)=−2f_x(3,-1) = -2 is negative. It increases in yy because fy(3,−1)=4f_y(3,-1) = 4 is positive.

Example 12

A cylinder with radius rr centimeters and height hh centimeters has volume

Vol(r,h)=πr2h \text{Vol}(r,h) = \pi r^2 h

cubic centimeters. Find the linear approximation of Vol when (r,h)=(2,5)(r,h) = (2,5), and use it to estimate the volume when the radius is 2.1 centimeters and the height is 4.9 centimeters.

ShowHide solution

To write the linear approximation, find Vol(2,5)\text{Vol}(2,5), Volr(2,5)\text{Vol}_r(2,5), and Volh(2,5)\text{Vol}_h(2,5). Compute the first partial derivatives. With respect to rr, the factor πh\pi h is a constant multiple. With respect to hh, the factor πr2\pi r^2 is a constant multiple:

Volr=∂∂r[πr2h]=2πrh,Volh=∂∂h[πr2h]=πr2. \text{Vol}_r = \frac{\partial}{\partial r}\bigl[\pi r^2 h\bigr] = 2\pi rh, \qquad \text{Vol}_h = \frac{\partial}{\partial h}\bigl[\pi r^2 h\bigr] = \pi r^2.

Evaluate all three at (2,5)(2,5):

Vol(2,5)=π(2)2(5)=20π,Volr(2,5)=2π(2)(5)=20π,Volh(2,5)=π(2)2=4π.\begin{align*} \text{Vol}(2,5) &= \pi(2)^2(5) = 20\pi,\\ \text{Vol}_r(2,5) &= 2\pi(2)(5) = 20\pi,\\ \text{Vol}_h(2,5) &= \pi(2)^2 = 4\pi. \end{align*}

Substitute the three values into the linear approximation:

L(r,h)=20π+20π(r−2)+4π(h−5). L(r,h) = 20\pi + 20\pi(r - 2) + 4\pi(h - 5).

Evaluate LL at (2.1,4.9)(2.1, 4.9). Used calculator.

L(2.1,4.9)=20π+20π(2.1−2)+4π(4.9−5)=20π+2π−0.4π=21.6π≈67.858.\begin{align*} L(2.1, 4.9) &= 20\pi + 20\pi(2.1 - 2) + 4\pi(4.9 - 5)\\ &= 20\pi + 2\pi - 0.4\pi = 21.6\pi \approx 67.858. \end{align*}

The estimated volume is about 67.858 cubic centimeters. As a check, the actual volume is

Vol(2.1,4.9)=π(2.1)2(4.9)=21.609π≈67.887 \text{Vol}(2.1, 4.9) = \pi(2.1)^2(4.9) = 21.609\pi \approx 67.887

cubic centimeters. The actual volume is above the estimate 21.6π21.6\pi by 0.009π≈0.0280.009\pi \approx 0.028 cubic centimeters.

Lesson map

Found a mistake, a broken tool or something unclear? Report a problem