Multivariable CalculusThe Chain Rule and the Gradient4 of 4
The Chain Rule and the Gradient · 4

Steepest Ascent and Level Sets

We know how to find the slope of a surface in any direction we pick, and now we want to flip the question and find which direction gives the steepest climb.

1

Finding the Direction of Steepest Ascent

Suppose we are standing on the surface f(x,y)=x2+y2\hill{f(x, y) = x^2 + y^2} at the point (1,2)(1, 2) and want to find which compass direction takes us uphill the fastest.

At (1,2)(1, 2), the East (xx) slope is 2x=2\rate{2x} = \rate{2} and the North (yy) slope is 2y=4\rate{2y} = \rate{4}. Putting those coordinate slopes together into the gradient vector ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]} lets us write the height change for any tiny step [Δx,Δy][\Delta x, \Delta y] as a dot product:

Change in height\displaystyle \rate{\text{Change in height}} =2Δx+4Δy\displaystyle = \rate{2}\Delta x + \rate{4}\Delta y =[2,4]⏟∇f(1,2)⋅[Δx,Δy]⏟step\displaystyle = \underbrace{\rate{[2, 4]}}_{\rate{\nabla f(1, 2)}} \cdot \underbrace{[\Delta x, \Delta y]}_{\text{step}}

Even though the North slope (4\rate{4}) is steeper than the East slope (2\rate{2}), walking purely North is not the steepest path up the hill.

Why the Gradient Points Uphill
f(x,y)=x2+y2\htmlClass{lc-blue}{f(x, y) = x^2 + y^2}
(1, 2, 5)(1,\,2,\,5)
Text solution
Find the coordinate slopes at the pointTaking the derivatives of f(x,y)=x2+y2\hill{f(x, y) = x^2 + y^2} in the East (xx) and North (yy) directions at (1,2)(1, 2) gives the gradient vector:
∇f(x,y)\displaystyle \rate{\nabla f(x, y)} =[2x,2y]\displaystyle = \rate{[2x, 2y]} =[2(1),2(2)]\displaystyle = [2(1), 2(2)] =[2,4]\displaystyle = \rate{[2, 4]}
Line the step up with the gradientA 1-meter step [Δx,Δy][\Delta x, \Delta y] makes the dot product [2,4]⋅[Δx,Δy]\rate{[2, 4]} \cdot [\Delta x, \Delta y] as large as possible when the step points in the exact same direction as [2,4]\rate{[2, 4]}, going 2\rate{2} parts East for every 4\rate{4} parts North:
Direction of steepest ascent\displaystyle \rate{\text{Direction of steepest ascent}} =∇f(1,2)\displaystyle = \rate{\nabla f(1, 2)} =[2,4]\displaystyle = \rate{[2, 4]}

So at (1,2)(1, 2), walking in the direction of the gradient [2,4]\rate{[2, 4]} climbs steeper than any other direction around you.

2

The Steepest Slope and Steepest Descent

Now that we know ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]} points straight uphill, we want to find what the steepest slope actually equals, and which direction drops downhill the fastest.

The Length of the Gradient and Steepest Descent
(1, 2)(1,\,2)
∇f(1,2)=[2,4]\htmlClass{lc-pink}{\nabla f(1, 2) = [2, 4]}
∥∇f(1,2)∥\htmlClass{lc-pink}{\|\nabla f(1, 2)\|}
Text solution
Measure the distance of a step along the gradientWalking directly along the vector [Δx,Δy]=[2,4][\Delta x, \Delta y] = [2, 4] covers a flat distance on the map equal to the length of the gradient arrow:
Distance walked\displaystyle \text{Distance walked} =∥[2,4]∥⏟length of ∇f(1,2)\displaystyle = \underbrace{\|[2, 4]\|}_{\text{length of } \rate{\nabla f(1, 2)}} =22+42\displaystyle = \sqrt{2^2 + 4^2} =20\displaystyle = \sqrt{20}
Divide height gained by distance walkedPlugging the step [Δx,Δy]=[2,4][\Delta x, \Delta y] = [2, 4] into 2Δx+4Δy\rate{2}\Delta x + \rate{4}\Delta y and dividing by the distance walked gives the steepest uphill slope:
Steepest uphill slope\displaystyle \rate{\text{Steepest uphill slope}} =2(2)+4(4)20\displaystyle = \frac{\rate{2}(2) + \rate{4}(4)}{\sqrt{20}} =4+1620\displaystyle = \frac{4 + 16}{\sqrt{20}} =2020\displaystyle = \frac{\rate{20}}{\sqrt{20}} =20\displaystyle = \rate{\sqrt{20}}
Reverse the gradient for steepest descentTurning 180∘180^\circ around to walk opposite the gradient gives the steepest downhill direction and makes the slope negative:
Direction of steepest descent=−∇f(1,2)=[−2,−4],Steepest downhill slope=−20\displaystyle \begin{aligned} &\rate{\text{Direction of steepest descent}} \\ &\quad = \rate{-\nabla f(1, 2)} = \rate{[-2, -4]}, \\ &\rate{\text{Steepest downhill slope}} = \rate{-\sqrt{20}} \end{aligned}

So at (1,2)(1, 2), the maximum uphill slope is the gradient's length 20≈4.47\rate{\sqrt{20}} \approx \rate{4.47} along [2,4]\rate{[2, 4]} (just beating the slope of 4.4\rate{4.4} along the nearby direction [3,4][3, 4]), and the steepest downhill slope is −20\rate{-\sqrt{20}} along [−2,−4]\rate{[-2, -4]}.

As a unit step [Δx,Δy][\Delta x, \Delta y] turns full circle around (1,2)(1, 2), the slope 2Δx+4Δy\rate{2}\Delta x + \rate{4}\Delta y rises past the pure North slope of 4\rate{4} to reach its peak of 20\rate{\sqrt{20}} when lined up with [2,4]\rate{[2, 4]}, drops to −20\rate{-\sqrt{20}} when pointing opposite [2,4]\rate{[2, 4]}, and hits 00 at a right angle to [2,4]\rate{[2, 4]}.

How steeply a 1-meter step climbs or drops at this point depends on how closely it lines up with the gradient.
3

Level Curves and Tangent Lines

Right where the slope hits 00, you are neither climbing nor descending: you are walking along the level curve x2+y2=5\hill{x^2 + y^2 = 5} that passes through (1,2)(1, 2). We can use the zero-change equation to find the direction of that level curve and write the equation of its tangent line without using implicit differentiation.

Why the Gradient Is Perpendicular to Level Curves
Change in height=2Δx+4Δy\htmlClass{lc-pink}{\text{Change in height}} = \htmlClass{lc-pink}{2}\Delta x + \htmlClass{lc-pink}{4}\Delta y
x2+y2=5\htmlClass{lc-blue}{x^2 + y^2 = 5}
(1, 2)(1,\,2)
[Δx,Δy][\Delta x, \Delta y]
xx
yy
x2+y2=5\htmlClass{lc-blue}{x^2 + y^2 = 5}
(1, 2)(1,\,2)
∇f(1,2)=[2,4]\htmlClass{lc-pink}{\nabla f(1, 2) = [2, 4]}
[2,−1][2, -1]
2(x−1)+4(y−2)=0\htmlClass{lc-pink}{2}(x - 1) + \htmlClass{lc-pink}{4}(y - 2) = 0
xx
yy
Text solution
Set the height change to zeroMoving along the level curve x2+y2=5\hill{x^2 + y^2 = 5} keeps your height the same, so the height change at (1,2)(1, 2) must equal zero:
2Δx+4Δy\displaystyle \rate{2}\Delta x + \rate{4}\Delta y =0\displaystyle = 0
Balance the East and North steps for the tangent directionStepping Δx=2\Delta x = 2 units East adds 4\rate{4} to height, so stepping Δy=−1\Delta y = -1 unit South cancels it out and gives a tangent vector perpendicular to ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]}:
[2,4]⋅[2,−1]\displaystyle \rate{[2, 4]} \cdot [2, -1] =2(2)+4(−1)\displaystyle = \rate{2}(2) + \rate{4}(-1) =4−4\displaystyle = 4 - 4 =0\displaystyle = 0
Plug in the step to (x,y)(x, y) for the tangent lineAny point (x,y)(x, y) on the tangent line is reached from (1,2)(1, 2) by a step Δx=x−1\Delta x = x - 1 and Δy=y−2\Delta y = y - 2 that gives zero in the height-change formula:
2(x−1)+4(y−2)\displaystyle \rate{2}(x - 1) + \rate{4}(y - 2) =0\displaystyle = 0

So at (1,2)(1, 2), the level curve runs in the direction [2,−1][2, -1] (or [−2,1][-2, 1]) at a 90∘90^\circ angle to ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]}, and the gradient immediately gives the normal vector to the tangent line 2(x−1)+4(y−2)=0\rate{2}(x - 1) + \rate{4}(y - 2) = 0.

4

Reading the Gradient on a Contour Map

What if we have no formula at all, only a contour map of a hill, and want to sketch the direction and length of ∇f\rate{\nabla f} at two points AA and BB on the 20\hill{20}-meter contour line?

Reading the Gradient on a Contour Map
10\htmlClass{lc-blue}{10}
20\htmlClass{lc-blue}{20}
30\htmlClass{lc-blue}{30}
40\htmlClass{lc-blue}{40}
AA
BB
10\htmlClass{lc-blue}{10}
20\htmlClass{lc-blue}{20}
30\htmlClass{lc-blue}{30}
40\htmlClass{lc-blue}{40}
AA
BB
∇f(A)\htmlClass{lc-pink}{\nabla f(A)}
∇f(B)\htmlClass{lc-pink}{\nabla f(B)}
Text solution
Draw the arrow perpendicular to the contour toward higher numbersAt both AA and BB, the gradient leaves the 20\hill{20}-meter contour at a 90∘90^\circ right angle pointing uphill toward the 30\hill{30}-meter contour.
Estimate the arrow's length as rise over runClimbing from the 20\hill{20}-meter contour to the 30\hill{30}-meter contour is a 1010-meter rise at both points, so the steepness comes from the horizontal distance between the contours:
∥∇f∥≈riserun=30−20distance from 20 contour to 30 contour\displaystyle \begin{aligned} &\rate{\|\nabla f\|} \approx \frac{\text{rise}}{\text{run}} \\ &\quad = \frac{\hill{30} - \hill{20}}{\begin{gathered} \text{distance from 20 contour } \\ \text{to 30 contour} \end{gathered}} \end{aligned}

So ∇f\rate{\nabla f} is a short arrow at AA, where the contours are spread far apart over a long run, and a long arrow at BB, where the contours are packed tightly together over a short run.

Across the entire contour map, the gradient arrow stays at a 90∘90^\circ right angle to the local level curve, getting longer where contours crowd together, getting shorter where they spread apart, and shrinking to zero right at the peak.

The gradient arrow always points straight uphill at a right angle to the level curve, growing longer where the hill is steeper and shrinking to zero at the peak.
5

Level Surfaces and Tangent Planes in Three Dimensions

Now suppose we have a curved surface in three dimensions, such as the sphere x2+y2+z2=14\hill{x^2 + y^2 + z^2 = 14} at the point (1,2,3)(1, 2, 3), and we want to find the equation of its tangent plane and normal line without solving for z=14−x2−y2\hill{z = \sqrt{14 - x^2 - y^2}}.

We can picture a three-variable function F(x,y,z)\hill{F(x, y, z)} as the temperature at every (x,y,z)(x, y, z) point in a room. Its gradient ∇F=[Fx,Fy,Fz]\rate{\nabla F} = \rate{[F_x, F_y, F_z]} puts together the rates of change in East (xx), North (yy), and Up (zz), pointing in the 3D direction where temperature rises the fastest. Setting the function equal to a constant F(x,y,z)=k\hill{F(x, y, z) = k} gives a level surface, where any tiny step [Δx,Δy,Δz][\Delta x, \Delta y, \Delta z] along the surface produces zero change in F\hill{F}:

ΔF≈[Fx,Fy,Fz]⏟∇F⋅[Δx,Δy,Δz]\displaystyle \rate{\Delta F} \approx \underbrace{\rate{[F_x, F_y, F_z]}}_{\rate{\nabla F}} \cdot [\Delta x, \Delta y, \Delta z] =FxΔx+FyΔy+FzΔz\displaystyle = \rate{F_x} \Delta x + \rate{F_y} \Delta y + \rate{F_z} \Delta z =0\displaystyle = 0
Level Surfaces and Tangent Planes in Three Dimensions
xx
yy
zz
x2+y2+z2=14\htmlClass{lc-blue}{x^2 + y^2 + z^2 = 14}
(1, 2, 3)(1,\,2,\,3)
Text solution
Find the 3D gradient at the pointViewing the sphere as the level surface F(x,y,z)=x2+y2+z2=14\hill{F(x, y, z) = x^2 + y^2 + z^2 = 14}, we take the three partial derivatives and plug in (1,2,3)(1, 2, 3):
∇F(x,y,z)\displaystyle \rate{\nabla F(x, y, z)} =[2x,2y,2z]  ⟹  ∇F(1,2,3)\displaystyle = \rate{[2x, 2y, 2z]} \implies \rate{\nabla F(1, 2, 3)} =[2(1),2(2),2(3)]\displaystyle = [2(1), 2(2), 2(3)] =[2,4,6]⏟normal vector\displaystyle = \underbrace{\rate{[2, 4, 6]}}_{\rate{\text{normal vector}}}
Set the change in F\hill{F} to zero for the tangent planeAny point (x,y,z)(x, y, z) on the tangent plane is reached from (1,2,3)(1, 2, 3) by a step [Δx,Δy,Δz][\Delta x, \Delta y, \Delta z] =[x−1,y−2,z−3]= [x - 1, y - 2, z - 3] that gives zero in the formula for the change in F\hill{F}:
2(x−1)+4(y−2)+6(z−3)\displaystyle \rate{2}(x - 1) + \rate{4}(y - 2) + \rate{6}(z - 3) =0\displaystyle = 0
Walk along the gradient for the normal lineStarting at (1,2,3)(1, 2, 3) and moving in the perpendicular direction ∇F(1,2,3)=[2,4,6]\rate{\nabla F(1, 2, 3)} = \rate{[2, 4, 6]} gives the parametric equations of the normal line:
x=1+2t,y=2+4t,z=3+6t\displaystyle \begin{aligned} x &= 1 + \rate{2}t, \\ y &= 2 + \rate{4}t, \\ z &= 3 + \rate{6}t \end{aligned}

So at (1,2,3)(1, 2, 3), the single vector ∇F(1,2,3)=[2,4,6]\rate{\nabla F(1, 2, 3)} = \rate{[2, 4, 6]} gives both the tangent plane 2(x−1)+4(y−2)+6(z−3)=0\rate{2}(x - 1) + \rate{4}(y - 2) + \rate{6}(z - 3) = 0 and the normal line in one step, without ever solving for zz. And on a smooth surface f(x,y)\hill{f(x, y)}, reaching a peak, valley bottom, or saddle point makes the tangent plane flat in every direction, so the gradient is ∇f=[0,0]\rate{\nabla f} = \rate{[0, 0]}.

At every point on the sphere x2+y2+z2=14\hill{x^2 + y^2 + z^2 = 14}, the tangent plane stays perpendicular to the local gradient arrow ∇F=[2x,2y,2z]\rate{\nabla F} = \rate{[2x, 2y, 2z]}, while the normal line runs straight along that arrow.

At every point on the sphere, every direction in the tangent plane stays perpendicular to the gradient arrow, while the normal line runs straight along it.

Summary

Everything the gradient does comes from a single dot product for a tiny step:

Change in f=∇f⋅[Δx,Δy]=fxΔx+fyΔy(or ∇F⋅[Δx,Δy,Δz] in 3D)\displaystyle \begin{aligned} &\rate{\text{Change in } f} = \rate{\nabla f} \cdot [\Delta x, \Delta y] \\ &\quad = \rate{f_x} \Delta x + \rate{f_y} \Delta y \\ &(\text{or } \rate{\nabla F} \cdot [\Delta x, \Delta y, \Delta z] \text{ in 3D}) \end{aligned}
Steepest climb and drop (step with or against ∇f\rate{\nabla f})

At (1,2)(1, 2) on f(x,y)=x2+y2\hill{f(x, y) = x^2 + y^2}, the gradient ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]} points straight uphill with maximum slope ∥[2,4]∥=20\rate{\|[2, 4]\|} = \rate{\sqrt{20}}, and −∇f(1,2)=[−2,−4]\rate{-\nabla f(1, 2)} = \rate{[-2, -4]} points straight downhill with slope −20\rate{-\sqrt{20}}. If a question only asks for the maximum slope, just take the length ∥∇f∥\rate{\|\nabla f\|}. Don't waste time finding a unit vector and taking a dot product.

When you still need a unit vector (a chosen direction)

If a problem asks for the rate of change along a specific vector like [3,4][3, 4] that isn't the gradient, divide that vector by its length to make a 1-unit step [35,45][\frac{3}{5}, \frac{4}{5}] first and dot it with ∇f\rate{\nabla f}: [2,4]⋅[35,45]=4.4\rate{[2, 4]} \cdot [\frac{3}{5}, \frac{4}{5}] = \rate{4.4}.

Zero change along a level curve f(x,y)=k\hill{f(x, y) = k} (step perpendicular to ∇f\rate{\nabla f})

Setting ∇f⋅[Δx,Δy]=0\rate{\nabla f} \cdot [\Delta x, \Delta y] = 0 keeps height constant. At (1,2)(1, 2) on x2+y2=5\hill{x^2 + y^2 = 5}, ∇f(1,2)=[2,4]\rate{\nabla f(1, 2)} = \rate{[2, 4]} is perpendicular to the curve, so swapping the two numbers and changing one sign gives the zero-change tangent direction [2,−1][2, -1], and plugging in [Δx,Δy]=[x−1,y−2][\Delta x, \Delta y] = [x - 1, y - 2] gives the tangent line 2(x−1)+4(y−2)=0\rate{2}(x - 1) + \rate{4}(y - 2) = 0. On a contour map without a formula, draw ∇f\rate{\nabla f} at 90∘90^\circ to the contour toward higher numbers, with length ≈rise/run\approx \text{rise} / \text{run}.

Tangent plane and normal line to a 3D surface F(x,y,z)=k\hill{F(x, y, z) = k}

Don't solve for zz when xx, yy, and zz are mixed together. For x2+y2+z2=14\hill{x^2 + y^2 + z^2 = 14} at (1,2,3)(1, 2, 3), ∇F(1,2,3)=[2,4,6]\rate{\nabla F(1, 2, 3)} = \rate{[2, 4, 6]} sticks out at 90∘90^\circ to the surface, immediately giving the tangent plane 2(x−1)+4(y−2)+6(z−3)=0\rate{2}(x - 1) + \rate{4}(y - 2) + \rate{6}(z - 3) = 0 and the normal line x=1+2t, y=2+4t, z=3+6tx = 1 + \rate{2}t, \, y = 2 + \rate{4}t, \, z = 3 + \rate{6}t.

6

Practice

1

On the surface f(x,y)=3x2−y2\hill{f(x, y) = 3x^2 - y^2} at the point (1,2)(1, 2), find the direction vector of steepest ascent, the maximum slope, the direction vector of steepest descent, and the steepest downhill slope.

How do the East (xx) and North (yy) slopes at (1,2)(1, 2) give you both the steepest uphill arrow and its steepness?

Take the partial derivatives of f(x,y)=3x2−y2\hill{f(x, y) = 3x^2 - y^2} and plug in (1,2)(1, 2) (watch the negative sign on −y2\hill{-y^2}, which gives −2y=−4\rate{-2y} = \rate{-4} rather than +4+4):
∇f(x,y)\displaystyle \rate{\nabla f(x, y)} =[6x,−2y]  ⟹  ∇f(1,2)\displaystyle = \rate{[6x, -2y]} \implies \rate{\nabla f(1, 2)} =[6(1),−2(2)]\displaystyle = [6(1), -2(2)] =[6,−4]\displaystyle = \rate{[6, -4]}
The direction of steepest ascent is ∇f(1,2)=[6,−4]\rate{\nabla f(1, 2)} = \rate{[6, -4]} (or any positive multiple such as [3,−2]\rate{[3, -2]}, with unit vector [313,−213][\frac{3}{\sqrt{13}}, -\frac{2}{\sqrt{13}}]).
The maximum uphill slope is the length of the gradient at (1,2)(1, 2):
Maximum slope\displaystyle \rate{\text{Maximum slope}} =∥[6,−4]∥\displaystyle = \rate{\|[6, -4]\|} =62+(−4)2\displaystyle = \sqrt{6^2 + (-4)^2} =36+16\displaystyle = \sqrt{36 + 16} =52\displaystyle = \sqrt{52} =213\displaystyle = \rate{2\sqrt{13}}
Reversing the gradient gives the direction of steepest descent:
Steepest descent direction\displaystyle \rate{\text{Steepest descent direction}} =−∇f(1,2)\displaystyle = \rate{-\nabla f(1, 2)} =[−6,4]\displaystyle = \rate{[-6, 4]}
(Watch out: don't take the length (−6)2+42=+213\sqrt{(-6)^2 + 4^2} = +2\sqrt{13} and leave the downhill slope positive. A vector's length is always positive, so you must put a minus sign in front for a downhill drop.)
Steepest downhill slope\displaystyle \rate{\text{Steepest downhill slope}} =−213\displaystyle = \rate{-2\sqrt{13}}
2

You are standing at (2,1)(2, 1) on the surface f(x,y)=x3+xy2\hill{f(x, y) = x^3 + xy^2}, which lies on the level curve x3+xy2=10\hill{x^3 + xy^2 = 10}. Find a direction vector along which a tiny step produces zero height change, and write the equation of the tangent line to the level curve at (2,1)(2, 1) without using implicit differentiation.

Which vector at (2,1)(2, 1) has a dot product of zero with a step [Δx,Δy][\Delta x, \Delta y] along the level curve?

Find the gradient of f(x,y)=x3+xy2\hill{f(x, y) = x^3 + xy^2} at (2,1)(2, 1):
∇f(x,y)\displaystyle \rate{\nabla f(x, y)} =[3x2+y2,2xy]  ⟹  ∇f(2,1)\displaystyle = \rate{[3x^2 + y^2, 2xy]} \implies \rate{\nabla f(2, 1)} =[3(2)2+12,2(2)(1)]\displaystyle = [3(2)^2 + 1^2, 2(2)(1)] =[13,4]\displaystyle = \rate{[13, 4]}
Set the height change equal to zero for a step [Δx,Δy][\Delta x, \Delta y] along the level curve:
13Δx+4Δy\displaystyle \rate{13}\Delta x + \rate{4}\Delta y =0\displaystyle = 0
(Watch out: simply swapping the numbers to [4,13][4, 13] without making one of them negative gives 13(4)+4(13)=104≠0\rate{13}(4) + \rate{4}(13) = 104 \neq 0; and don't plug the tangent vector [4,−13][4, -13] in as the numbers in front of (x−2)(x - 2) and (y−1)(y - 1) to get 4(x−2)−13(y−1)=04(x - 2) - 13(y - 1) = 0, which would give the normal line instead.)
Choosing Δx=4\Delta x = 4 and Δy=−13\Delta y = -13 makes the dot product zero, giving the zero-change tangent direction [4,−13][4, -13] (or [−4,13][-4, 13]).
Replacing Δx=x−2\Delta x = x - 2 and Δy=y−1\Delta y = y - 1 in the zero-change equation gives the tangent line:
13(x−2)+4(y−1)\displaystyle \rate{13}(x - 2) + \rate{4}(y - 1) =0\displaystyle = 0
3

On a contour map of a hill, the 20\hill{20}-meter contour line runs straight North-South through both point AA and point BB. The 30\hill{30}-meter contour line lies 5 meters5\text{ meters} East of point AA and 2 meters2\text{ meters} East of point BB. In which compass direction does ∇f\rate{\nabla f} point at both points, at which point is the gradient arrow longer, and what is the approximate length of ∇f\rate{\nabla f} at each point?

If the contour runs North-South and higher ground is to the East, which way is perpendicular and uphill, and how does rise over run measure steepness?

Because ∇f\rate{\nabla f} is perpendicular to the North-South 20\hill{20}-meter contour and points toward the higher 30\hill{30}-meter contour, ∇f\rate{\nabla f} points due East at both AA and BB.
(Watch out: don't say the gradient is longer at AA just because 5 meters5\text{ meters} is larger than 2 meters2\text{ meters}, and don't divide run by rise to get 510=0.5\frac{5}{10} = 0.5 and 210=0.2\frac{2}{10} = 0.2. A shorter horizontal run for the same 1010-meter climb means a steeper hill.)
The gradient arrow is longer at BB, where the contours are packed closer together. Estimating steepness as rise over run for the 1010-meter climb gives:
∥∇f(A)∥≈30−205=105=2,∥∇f(B)∥≈30−202=102=5\displaystyle \begin{aligned} \rate{\|\nabla f(A)\|} &\approx \frac{\hill{30} - \hill{20}}{5} = \frac{10}{5} = \rate{2}, \\ \rate{\|\nabla f(B)\|} &\approx \frac{\hill{30} - \hill{20}}{2} = \frac{10}{2} = \rate{5} \end{aligned}
4

The temperature in a room is given by T(x,y,z)\hill{T(x, y, z)} =x2+2y2−z2\hill{= x^2 + 2y^2 - z^2}. At the point (1,1,2)(1, 1, 2), compare the rate of temperature change in the direction of the vector [2,2,−1][2, 2, -1] to the maximum possible rate of temperature increase at that point, and explain why the two values are close.

Before dotting the step direction [2,2,−1][2, 2, -1] with ∇T(1,1,2)\rate{\nabla T(1, 1, 2)}, how long is the vector [2,2,−1][2, 2, -1]?

Find the temperature gradient at (1,1,2)(1, 1, 2):
∇T(x,y,z)\displaystyle \rate{\nabla T(x, y, z)} =[2x,4y,−2z]  ⟹  ∇T(1,1,2)\displaystyle = \rate{[2x, 4y, -2z]} \implies \rate{\nabla T(1, 1, 2)} =[2(1),4(1),−2(2)]\displaystyle = [2(1), 4(1), -2(2)] =[2,4,−4]\displaystyle = \rate{[2, 4, -4]}
(Watch out: dotting [2,4,−4]\rate{[2, 4, -4]} directly with [2,2,−1][2, 2, -1] without dividing [2,2,−1][2, 2, -1] by its length to make a unit step first gives 4+8+4=164 + 8 + 4 = 16, which is 33 times too large because [2,2,−1][2, 2, -1] has length 22+22+(−1)2=3\sqrt{2^2 + 2^2 + (-1)^2} = 3.)
Dividing [2,2,−1][2, 2, -1] by its length 33 gives the unit step [23,23,−13][\frac{2}{3}, \frac{2}{3}, -\frac{1}{3}], so the rate of change in that direction is:
[2,4,−4]⋅[23,23,−13]\displaystyle \rate{[2, 4, -4]} \cdot \left[\frac{2}{3}, \frac{2}{3}, -\frac{1}{3}\right] =43+83+43\displaystyle = \frac{4}{3} + \frac{8}{3} + \frac{4}{3} =163≈5.33\displaystyle = \rate{\frac{16}{3}} \approx \rate{5.33}
The maximum possible rate of temperature increase is the length of the gradient:
∥[2,4,−4]∥\displaystyle \rate{\|[2, 4, -4]\|} =22+42+(−4)2\displaystyle = \sqrt{2^2 + 4^2 + (-4)^2} =4+16+16\displaystyle = \sqrt{4 + 16 + 16} =36\displaystyle = \sqrt{36} =6\displaystyle = \rate{6}
The two values are close because [2,2,−1][2, 2, -1] points nearly in the same direction as the gradient [2,4,−4]\rate{[2, 4, -4]}: 163≈5.33\rate{\frac{16}{3}} \approx \rate{5.33} versus 6\rate{6}.
5

Find the equation of the tangent plane and the parametric equations of the normal line to the surface x2+2y2+3z2=23\hill{x^2 + 2y^2 + 3z^2 = 23} at the point (3,−1,2)(3, -1, 2).

Treat the surface as a level surface F(x,y,z)=23\hill{F(x, y, z) = 23}. What single vector at (3,−1,2)(3, -1, 2) is perpendicular to the tangent plane and parallel to the normal line?

View the surface as the level surface F(x,y,z)=x2+2y2+3z2=23\hill{F(x, y, z) = x^2 + 2y^2 + 3z^2 = 23} and find ∇F\rate{\nabla F} at (3,−1,2)(3, -1, 2):
∇F(x,y,z)\displaystyle \rate{\nabla F(x, y, z)} =[2x,4y,6z]  ⟹  ∇F(3,−1,2)\displaystyle = \rate{[2x, 4y, 6z]} \implies \rate{\nabla F(3, -1, 2)} =[2(3),4(−1),6(2)]\displaystyle = [2(3), 4(-1), 6(2)] =[6,−4,12]\displaystyle = \rate{[6, -4, 12]}
(Watch out: at y0=−1y_0 = -1, the step is Δy=y−(−1)=y+1\Delta y = y - (-1) = y + 1, not y−1y - 1; and in the normal line, don't swap the starting point (3,−1,2)(3, -1, 2) with the direction vector [6,−4,12]\rate{[6, -4, 12]} to write x=6+3tx = 6 + 3t.)
Setting the change in F\hill{F} to zero gives the tangent plane:
6(x−3)−4(y+1)+12(z−2)=0(or 3(x−3)−2(y+1)+6(z−2)=0)\displaystyle \begin{aligned} &\rate{6}(x - 3) - \rate{4}(y + 1) + \rate{12}(z - 2) = 0 \\ &(\text{or } \rate{3}(x - 3) - \rate{2}(y + 1) \\ &\quad + \rate{6}(z - 2) = 0) \end{aligned}
Starting at (3,−1,2)(3, -1, 2) and walking along [6,−4,12]\rate{[6, -4, 12]} gives the normal line:
x=3+6t,y=−1−4t,z=2+12t\displaystyle \begin{aligned} x &= 3 + \rate{6}t, \\ y &= -1 - \rate{4}t, \\ z &= 2 + \rate{12}t \end{aligned}
6

Find all points on the level surface x2+2y2+z2=24\hill{x^2 + 2y^2 + z^2 = 24} where the tangent plane is perpendicular to the vector [1,2,−1][1, 2, -1].

If the tangent plane is perpendicular to [1,2,−1][1, 2, -1], how must the surface's gradient normal vector ∇F=[2x,4y,2z]\rate{\nabla F} = \rate{[2x, 4y, 2z]} line up with [1,2,−1][1, 2, -1]?

For F(x,y,z)=x2+2y2+z2=24\hill{F(x, y, z) = x^2 + 2y^2 + z^2 = 24}, the normal vector to the tangent plane is the gradient:
∇F(x,y,z)\displaystyle \rate{\nabla F(x, y, z)} =[2x,4y,2z]\displaystyle = \rate{[2x, 4y, 2z]}
(Watch out: don't see the word "perpendicular" and set the dot product [2x,4y,2z]⋅[1,2,−1]=0\rate{[2x, 4y, 2z]} \cdot [1, 2, -1] = 0. Because ∇F\rate{\nabla F} is already perpendicular to the tangent plane, a tangent plane perpendicular to [1,2,−1][1, 2, -1] means ∇F\rate{\nabla F} must be parallel to [1,2,−1][1, 2, -1]. Also match the full gradient [2x,4y,2z]\rate{[2x, 4y, 2z]} rather than setting [x,y,z]=t[1,2,−1][x, y, z] = t[1, 2, -1].)
Setting ∇F\rate{\nabla F} equal to a multiple 2t2t of [1,2,−1][1, 2, -1] gives:
[2x,4y,2z]=2t[1,2,−1]=[2t,4t,−2t]  ⟹  x=t,y=t,z=−t\displaystyle \begin{aligned} &\rate{[2x, 4y, 2z]} = 2t[1, 2, -1] \\ &\quad = [2t, 4t, -2t] \\ &\implies x = t, \quad y = t, \quad z = -t \end{aligned}
Plug x=tx = t, y=ty = t, and z=−tz = -t into the surface equation x2+2y2+z2=24\hill{x^2 + 2y^2 + z^2 = 24} (remembering both the positive and negative square roots):
t2+2(t)2+(−t)2=24  ⟹  4t2=24  ⟹  t2=6  ⟹  t=±6\displaystyle \begin{aligned} &t^2 + 2(t)^2 + (-t)^2 = 24 \\ &\implies 4t^2 = 24 \implies t^2 = 6 \\ &\implies t = \pm\sqrt{6} \end{aligned}
Plugging t=6t = \sqrt{6} and t=−6t = -\sqrt{6} back into (t,t,−t)(t, t, -t) gives the two points:
(6,6,−6)and(−6,−6,6)\displaystyle \begin{aligned} &(\sqrt{6}, \sqrt{6}, -\sqrt{6}) \quad \text{and} \\ &(-\sqrt{6}, -\sqrt{6}, \sqrt{6}) \end{aligned}