math.wiki
Calculus › Partial derivatives › Gradient and directional derivatives
Sign in

Gradient and directional derivatives

Partial derivatives give the rate of change of a function along the coordinate axes. What is its rate of change in any other direction, and in which direction does it grow fastest?

Where you are 8 in Partial derivatives

Why this exists

A partial derivative (Partial derivatives) measures how f(x, y) changes along a line parallel to an axis. But a hiker can set off in any direction, and the slope she meets depends on it. What is the rate of change in an arbitrary direction, and which direction gives the largest? And a level surface F(x, y, z) = c can have a vertical tangent plane, which no graph z = f(x, y) supplies (Tangent planes and linear approximation). One vector built from the partial derivatives, the gradient, answers all three.

Naomi and Mei run a cedar sauna, where how fast the temperature changes as Mei moves her hand depends on the direction (Example 2).

Definition

Let f : D \to \mathbb{R} with D \subseteq \mathbb{R}^n, let \mathbf{a} be an interior point of D, and let \mathbf{u} be a unit vector. The directional derivative of f at \mathbf{a} in the direction \mathbf{u} is

D_{\mathbf{u}} f(\mathbf{a}) = \lim_{t \to 0} \frac{f(\mathbf{a} + t\mathbf{u}) - f(\mathbf{a})}{t},

if the limit exists. The step t\mathbf{u} has length \lvert t \rvert, so D_{\mathbf{u}} f is a rate per unit distance; that is why \mathbf{u} must be a unit vector. A direction named by a nonzero vector \mathbf{v} means \mathbf{u} = \mathbf{v}/\lVert \mathbf{v} \rVert; in the plane, the direction \theta means \mathbf{u} = \langle \cos\theta, \sin\theta \rangle. The directions \mathbf{i} and \mathbf{j} give back f_x and f_y.

If every first partial derivative of f exists at \mathbf{a}, the gradient of f at \mathbf{a} is the vector

\nabla f(\mathbf{a}) = \left\langle \frac{\partial f}{\partial x_1}(\mathbf{a}), \dots, \frac{\partial f}{\partial x_n}(\mathbf{a}) \right\rangle,

so \nabla f = \langle f_x, f_y \rangle in two variables and \langle f_x, f_y, f_z \rangle in three. It is a vector in \mathbb{R}^n, the space of the inputs.

Let f(\mathbf{a}) = c. A vector is normal to the level set f = c (Functions of several variables and level sets) at \mathbf{a} if it is perpendicular (Orthogonal vectors) to \mathbf{r}'(t_0) for every curve \mathbf{r} in the level set, on an open interval about t_0, with \mathbf{r}(t_0) = \mathbf{a} and \mathbf{r} differentiable at t_0. If F is differentiable at P = (x_0, y_0, z_0) with \nabla F(P) \ne \mathbf{0}, the tangent plane to the level surface F(x, y, z) = c at P is the plane through P with normal \nabla F(P),

\begin{aligned} &F_x(P)(x - x_0) + F_y(P)(y - y_0) \\ &\quad + F_z(P)(z - z_0) = 0, \end{aligned}

and the normal line is \mathbf{r}(t) = \langle x_0, y_0, z_0 \rangle + t\,\nabla F(P). The tangent line to a level curve F(x, y) = c is defined the same way.

A path of steepest ascent of f is a differentiable curve \mathbf{r}(t) whose velocity is at every point a positive multiple of \nabla f(\mathbf{r}(t)); a path of steepest descent uses -\nabla f.

Intuition

Stand at (a, b) and look along \mathbf{u} = \langle p, q \rangle. The vertical plane through that line cuts the graph z = f(x, y) in the curve z = f(a + tp, b + tq), with t the distance along the line, and D_{\mathbf{u}} f(a, b) is its slope at t = 0. For a differentiable f the graph is close to its tangent plane, which rises by f_x h + f_y k over the step \langle h, k \rangle, so by t(f_x p + f_y q) over the step t\mathbf{u}. The slope in direction \mathbf{u} is the dot product \nabla f \cdot \mathbf{u}.

So D_{\mathbf{u}} f = \lVert \nabla f \rVert \cos\theta, with \theta the angle from the gradient to \mathbf{u} (The dot product and the angle between vectors): the scalar component of \nabla f along \mathbf{u} (Vector and scalar projection, Figure 2), largest at \theta = 0 and zero at \displaystyle \theta = \frac{\pi}{2}. On a contour map the gradient points uphill, across the level curves at right angles (Figure 1).

11 9 7 5 3 12
Figure 1Level curves of h(x, y) = 12 - x^2 - 3y^2, with \nabla h drawn at six points of the level curve h = 5 at one tenth of its length. The dashed curve \displaystyle y = \frac{x^3}{8} is the path of steepest ascent from (2, 1) (Example 5); the gradient is tangent to it.
θ
\nabla f(\mathbf{a})
\mathbf{u}
D_{\mathbf{u}} f(\mathbf{a})
\mathbf{a}
Figure 2D_{\mathbf{u}} f(\mathbf{a}) = \nabla f(\mathbf{a}) \cdot \mathbf{u} = \lVert \nabla f(\mathbf{a}) \rVert \cos\theta is the signed length of the shadow of \nabla f(\mathbf{a}) on the line of \mathbf{u}. It is largest when \mathbf{u} points along the gradient.

Results

Throughout, f : D \to \mathbb{R} and \mathbf{a} are as in the definition.

Result 1 (the chain rule in gradient form). Let \mathbf{r} map an open interval about t_0 into D and be differentiable at t_0, and let f be differentiable at \mathbf{r}(t_0). Then f(\mathbf{r}(t)) is differentiable at t_0, with derivative

\nabla f(\mathbf{r}(t_0)) \cdot \mathbf{r}'(t_0).

Result 2 (directional derivatives). If f is differentiable at \mathbf{a}, then D_{\mathbf{u}} f(\mathbf{a}) exists for every unit vector \mathbf{u}, and

D_{\mathbf{u}} f(\mathbf{a}) = \nabla f(\mathbf{a}) \cdot \mathbf{u}.

If \nabla f(\mathbf{a}) \ne \mathbf{0} and \theta is the angle between \nabla f(\mathbf{a}) and \mathbf{u}, this is \lVert \nabla f(\mathbf{a}) \rVert \cos\theta.

Result 3 (steepest ascent). Let f be differentiable at \mathbf{a} with \nabla f(\mathbf{a}) \ne \mathbf{0}. Over unit vectors \mathbf{u}, the largest value of D_{\mathbf{u}} f(\mathbf{a}) is \lVert \nabla f(\mathbf{a}) \rVert, taken only at \mathbf{u} = \nabla f(\mathbf{a}) / \lVert \nabla f(\mathbf{a}) \rVert; the smallest is -\lVert \nabla f(\mathbf{a}) \rVert, taken only at the opposite unit vector; and D_{\mathbf{u}} f(\mathbf{a}) = 0 exactly when \mathbf{u} is perpendicular to \nabla f(\mathbf{a}). If \nabla f(\mathbf{a}) = \mathbf{0}, every directional derivative at \mathbf{a} is 0.

Result 4 (the gradient is normal to level sets). If f is differentiable at \mathbf{a} and f(\mathbf{a}) = c, then \nabla f(\mathbf{a}) is normal to the level set f = c at \mathbf{a}.

Result 5 (level surfaces as graphs). Let F have continuous first partials on an open set containing P = (x_0, y_0, z_0), with F(P) = c and F_z(P) \ne 0. Then near P the level surface F = c is a graph z = \varphi(x, y), whose tangent plane at P (Tangent planes and linear approximation) is the plane through P with normal \nabla F(P). Likewise if F_x(P) \ne 0 or F_y(P) \ne 0, with a graph over the yz-plane or the xz-plane. So wherever \nabla F(P) \ne \mathbf{0}, the tangent plane of the definition is that of a graph.

Result 6 (rules for gradients). If the first partials of f and g exist at \mathbf{a}, \alpha and \beta are constants, and G is a function of one variable differentiable at f(\mathbf{a}), then at \mathbf{a}

\begin{aligned} \nabla(\alpha f + \beta g) &= \alpha\nabla f + \beta\nabla g, \\ \nabla(fg) &= f\,\nabla g + g\,\nabla f, \\ \nabla(G \circ f) &= G'(f)\,\nabla f. \end{aligned}
Why it is true

Result 1. Write \mathbf{r}(t) = \langle x_1(t), \dots, x_n(t) \rangle. Result 1 of The multivariable chain rule, in its n-variable form, gives the derivative \displaystyle \sum_i \frac{\partial f}{\partial x_i}\,x_i'(t_0), which is \nabla f(\mathbf{r}(t_0)) \cdot \mathbf{r}'(t_0).

Result 2. Some open ball about \mathbf{a} lies in D, so \mathbf{r}(t) = \mathbf{a} + t\mathbf{u} stays in D for small \lvert t \rvert, and \mathbf{r}'(0) = \mathbf{u}. Let g(t) = f(\mathbf{a} + t\mathbf{u}). By Result 1, g'(0) exists and equals \nabla f(\mathbf{a}) \cdot \mathbf{u}; and \displaystyle g'(0) = \lim_{t \to 0} \frac{g(t) - g(0)}{t} is exactly the limit that defines D_{\mathbf{u}} f(\mathbf{a}). The cosine form is the definition of the angle with \lVert \mathbf{u} \rVert = 1 (Dot product, length and orthogonality in n dimensions).

Result 3. Write \mathbf{g} = \nabla f(\mathbf{a}) and \mathbf{w} = \mathbf{g}/\lVert \mathbf{g} \rVert. For a unit vector \mathbf{u}, expanding (\mathbf{u} - \mathbf{w}) \cdot (\mathbf{u} - \mathbf{w}) gives \lVert \mathbf{u} - \mathbf{w} \rVert^2 = 2 - 2\,\mathbf{u} \cdot \mathbf{w}, since both vectors have length 1. Multiply by \displaystyle \frac12\lVert \mathbf{g} \rVert and use Result 2:

\lVert \mathbf{g} \rVert - D_{\mathbf{u}} f(\mathbf{a}) = \tfrac12 \lVert \mathbf{g} \rVert\, \lVert \mathbf{u} - \mathbf{w} \rVert^2 \ge 0,

with equality only when \mathbf{u} = \mathbf{w}. The same computation with \mathbf{u} + \mathbf{w} gives \displaystyle D_{\mathbf{u}} f(\mathbf{a}) + \lVert \mathbf{g} \rVert = \frac12\lVert \mathbf{g} \rVert\,\lVert \mathbf{u} + \mathbf{w} \rVert^2 \ge 0, with equality only when \mathbf{u} = -\mathbf{w}. The statements about 0 are Result 2 read directly.

Result 4. Let \mathbf{r} be a curve as in the definition of a normal. Then f(\mathbf{r}(t)) = c on an open interval about t_0, so its derivative at t_0 is 0, and by Result 1 that derivative is \nabla f(\mathbf{a}) \cdot \mathbf{r}'(t_0).

Result 5. The implicit function theorem, stated in The multivariable chain rule and proved in Real Analysis, gives a function \varphi with continuous partials on an open disk about (x_0, y_0), with \varphi(x_0, y_0) = z_0, such that near P the level surface consists exactly of the points (x, y, \varphi(x, y)). Result 3 of that lesson gives \displaystyle \varphi_x = -\frac{F_x(P)}{F_z(P)} and \displaystyle \varphi_y = -\frac{F_y(P)}{F_z(P)} at (x_0, y_0). Having continuous partials, \varphi is differentiable (Result 2 of Tangent planes and linear approximation), and its tangent plane at P has normal

\langle \varphi_x, \varphi_y, -1 \rangle = -\frac{1}{F_z(P)}\,\nabla F(P),

a nonzero multiple of \nabla F(P); two planes through P with parallel normals coincide. If F_x(P) \ne 0, exchange the roles of x and z: the surface is x = \psi(y, z), and its tangent plane has normal \displaystyle \langle -1, \psi_y, \psi_z \rangle = -\frac{1}{F_x(P)}\nabla F(P). The case F_y(P) \ne 0 is the same.

Result 6. The ith component of \nabla(fg) is \displaystyle \frac{\partial}{\partial x_i}(fg), an ordinary derivative in x_i with the other variables fixed (Partial derivatives). The product rule makes it \displaystyle f\frac{\partial g}{\partial x_i} + g\frac{\partial f}{\partial x_i}, the ith component of f\nabla g + g\nabla f. The sum rule and the one-variable chain rule (The chain rule) give the other two the same way.

Worked examples

Example 1

A directional derivative two ways

Let f(x, y) = x^2 e^y. Find the directional derivative of f at (3, 0) in the direction of \mathbf{v} = \langle 4, -3 \rangle, first from the definition and then from the gradient.

Solution

The unit vector is \displaystyle \mathbf{u} = \frac{\mathbf{v}}{5} = \left\langle \frac45, -\frac35 \right\rangle. Along the line, \displaystyle g(t) = f\left(3 + \frac45 t, -\frac35 t\right) = \left(3 + \frac45 t\right)^2 e^{-3t/5}, and the definition asks for g'(0). By the product rule,

g'(0) = 2 \cdot 3 \cdot \tfrac45 + 9 \cdot \left(-\tfrac35\right) = -\tfrac35.

From the gradient: f_x = 2xe^y and f_y = x^2 e^y are continuous, so f is differentiable (Result 2 of Tangent planes and linear approximation) and Result 2 applies. \nabla f(3, 0) = \langle 6, 9 \rangle, and \displaystyle \nabla f(3, 0) \cdot \mathbf{u} = \frac{24}{5} - \frac{27}{5} = -\frac35. So f decreases at \displaystyle \frac35 per unit distance in the direction of \mathbf{v}, while its largest rate there is \displaystyle \lVert \langle 6, 9 \rangle \rVert = 3\sqrt{13} \approx 10.82 (Result 3).

Example 2

Temperature in the sauna

Naomi and Mei model the air temperature in their sauna, in degrees Celsius, by T(x, y, z) = 70 - x^2 - 2y^2 + 7z, with distances in meters, the z-axis running up through the center of the stove and z = 0 the floor. Mei’s hand is at P = (2, 1, 1.5). (a) At what rate does the temperature change as her hand moves toward the vent at Q = (4, 3, 0.5)? (b) In which direction does it rise fastest, and at what rate? (c) If she moves her hand toward the vent at 0.5 meters per second, how fast does the temperature at her hand change?

Solution

T(P) = 70 - 4 - 2 + 10.5 = 74.5 degrees. T is a polynomial, so it is differentiable, and \nabla T = \langle -2x, -4y, 7 \rangle, which is \langle -4, -4, 7 \rangle at P.

(a) \overrightarrow{PQ} = \langle 2, 2, -1 \rangle has length 3, so \displaystyle \mathbf{u} = \left\langle \frac23, \frac23, -\frac13 \right\rangle, and by Result 2

D_{\mathbf{u}} T(P) = \frac{-8 - 8 - 7}{3} = -\frac{23}{3} \approx -7.67

degrees per meter: toward the vent, the air cools.

(b) By Result 3 the fastest rise is along \nabla T(P), at \displaystyle \lVert \langle -4, -4, 7 \rangle \rVert = \sqrt{81} = 9 degrees per meter, in the direction \displaystyle \left\langle -\frac49, -\frac49, \frac79 \right\rangle: in toward the stove’s axis, and up.

(c) Her hand moves along \mathbf{r}(t) = P + 0.5t\,\mathbf{u}, with velocity 0.5\mathbf{u}, so by Result 1 the temperature there changes at \displaystyle \nabla T(P) \cdot 0.5\mathbf{u} = -\frac{23}{6} \approx -3.83 degrees per second: the rate per meter times the speed.

Example 3

Every direction with a given rate

Let f(x, y) = \dfrac{x^2}{y}. (a) Find every unit vector \mathbf{u} with D_{\mathbf{u}} f(1, 1) = 1. (b) Is there one with D_{\mathbf{u}} f(1, 1) = 3? (c) In which directions is the rate 0?

Solution

Where y \ne 0, \displaystyle f_x = \frac{2x}{y} and \displaystyle f_y = -\frac{x^2}{y^2} are continuous, so f is differentiable near (1, 1), with \nabla f(1, 1) = \langle 2, -1 \rangle.

(a) Let \mathbf{u} = \langle p, q \rangle. Result 2 turns the condition into 2p - q = 1, and p^2 + q^2 = 1. Substituting q = 2p - 1 gives 5p^2 - 4p = 0, so p = 0 or \displaystyle p = \frac45:

\mathbf{u} = \langle 0, -1 \rangle \quad\text{or}\quad \mathbf{u} = \left\langle \tfrac45, \tfrac35 \right\rangle,

one on each side of the gradient, at the same angle from it.

(b) No. By Result 3 no rate exceeds \displaystyle \lVert \langle 2, -1 \rangle \rVert = \sqrt5 \approx 2.24.

(c) Exactly the unit vectors perpendicular to \langle 2, -1 \rangle, namely \displaystyle \pm\frac{1}{\sqrt5}\langle 1, 2 \rangle. They point along the level curve f = 1, the parabola y = x^2, whose slope at (1, 1) is 2.

Example 4

A level surface with vertical tangent planes

Let S be the hyperboloid of one sheet x^2 + 2y^2 - z^2 = 5. (a) Find the tangent plane and the normal line at P = (1, 2, 2). (b) Find every point of S where the tangent plane is vertical.

Solution

Let F(x, y, z) = x^2 + 2y^2 - z^2, so S is the level surface F = 5 and \nabla F = \langle 2x, 4y, -2z \rangle. The gradient vanishes only at the origin, which is not on S, and F has continuous partials, so Result 5 gives a tangent plane at every point of S.

(a) P is on S, since 1 + 8 - 4 = 5, and \nabla F(P) = \langle 2, 8, -4 \rangle. The tangent plane is 2(x - 1) + 8(y - 2) - 4(z - 2) = 0, that is,

x + 4y - 2z = 5,

and the normal line is \mathbf{r}(t) = \langle 1 + 2t, 2 + 8t, 2 - 4t \rangle.

(b) The plane is vertical when its normal is horizontal, that is, when -2z = 0. So the tangent plane is vertical exactly along the ellipse x^2 + 2y^2 = 5 in the plane z = 0, the waist of S; at \displaystyle (\sqrt5, 0, 0), for instance, it is the plane \displaystyle x = \sqrt5. There the graphs \displaystyle z = \pm\sqrt{x^2 + 2y^2 - 5} have no partial derivatives, yet the level surface has a tangent plane.

Example 5

The path of steepest ascent

Let h(x, y) = 12 - x^2 - 3y^2, a hill with its summit at the origin. Find the path of steepest ascent from (2, 1), and show that it crosses every level curve at right angles.

Solution

Take \mathbf{r}' = \nabla h(\mathbf{r}); any other positive multiple traces the same curve at another speed. With \mathbf{r} = \langle x, y \rangle this is x' = -2x and y' = -6y, with x(0) = 2 and y(0) = 1. The solutions of w' = kw are the functions Ce^{kt}, so

x = 2e^{-2t}, \qquad y = e^{-6t}.

Since \displaystyle e^{-6t} = (e^{-2t})^3 = \left(\frac{x}{2}\right)^3, the path is the curve \displaystyle y = \frac{x^3}{8} for 0 < x \le 2, which approaches the summit as t \to \infty (Figure 1). Along it h = 12 - 4e^{-4t} - 3e^{-12t} increases, as it must.

The level curve x^2 + 3y^2 = k through a point of the path has slope \displaystyle -\frac{x}{3y} there (implicit differentiation, The multivariable chain rule), and the path has slope \displaystyle \frac{3x^2}{8} = \frac{3y}{x}, using \displaystyle y = \frac{x^3}{8}. The product of the slopes is -1, so they cross at right angles, as Result 4 predicts. The path does not aim at the summit: its initial rate \displaystyle 2\sqrt{13} \approx 7.21 beats the \displaystyle \frac{14}{\sqrt5} \approx 6.26 of heading straight for the top.

Example 6

Proof: the reflection property of the ellipse

Let F_1 and F_2 be points of the plane and 2a > \lVert \overrightarrow{F_1F_2} \rVert. The ellipse with foci F_1 and F_2 is the set of points X with \lVert \overrightarrow{F_1X} \rVert + \lVert \overrightarrow{F_2X} \rVert = 2a (The ellipse). Prove that at each point P of the ellipse the normal makes equal angles with the directions from P to the two foci, so that a ray from one focus reflects off the ellipse through the other.

Solution

For a fixed point A = (p, q) let \displaystyle d(x, y) = \sqrt{(x - p)^2 + (y - q)^2}. Away from A, \displaystyle d_x = \frac{x - p}{d} and \displaystyle d_y = \frac{y - q}{d} are continuous, so d is differentiable and

\nabla d(X) = \frac{\overrightarrow{AX}}{\lVert \overrightarrow{AX} \rVert},

the unit vector pointing from A toward X. Let f be the sum of the distances to F_1 and F_2, so the ellipse is the level curve f = 2a; neither focus is on it, since f(F_1) = f(F_2) = \lVert \overrightarrow{F_1F_2} \rVert < 2a. With \mathbf{e}_1 and \mathbf{e}_2 the unit vectors from F_1 and from F_2 toward P, Result 6 gives \nabla f(P) = \mathbf{e}_1 + \mathbf{e}_2.

This is not \mathbf{0}: if \mathbf{e}_1 = -\mathbf{e}_2, then P lies on the segment F_1F_2 and f(P) = \lVert \overrightarrow{F_1F_2} \rVert < 2a. By Result 4, \nabla f(P) is normal to the ellipse at P. Now

\begin{aligned} (\mathbf{e}_1 + \mathbf{e}_2) \cdot \mathbf{e}_1 &= 1 + \mathbf{e}_1 \cdot \mathbf{e}_2 \\ &= (\mathbf{e}_1 + \mathbf{e}_2) \cdot \mathbf{e}_2, \end{aligned}

and \mathbf{e}_1 and \mathbf{e}_2 both have length 1, so \nabla f(P) makes equal angles with them. Hence -\nabla f(P) makes equal angles with -\mathbf{e}_1 and -\mathbf{e}_2, the directions from P to the foci: the law of reflection.

Boundaries

Directional derivatives in every direction do not make a function differentiable. Let f(x, y) = \dfrac{x^3}{x^2 + y^2} for (x, y) \ne (0, 0) and f(0, 0) = 0. For \mathbf{u} = \langle p, q \rangle, f(tp, tq) = tp^3, so D_{\mathbf{u}} f(0, 0) = p^3 exists in every direction. Yet \nabla f(0, 0) = \langle 1, 0 \rangle, and for \displaystyle \mathbf{u} = \frac{1}{\sqrt2}\langle 1, 1 \rangle, \displaystyle p^3 = \frac{\sqrt2}{4} is not \displaystyle \nabla f(0, 0) \cdot \mathbf{u} = \frac{\sqrt2}{2}; by Result 2, f is not differentiable at the origin. Even D_{\mathbf{u}} f = \nabla f \cdot \mathbf{u} in every direction is not enough (Exercise 17).

A zero gradient gives no direction. At the summit in Example 5 every directional derivative is 0 and Result 3 names no steepest direction; what such points can be is the subject of Extrema and the second derivative test. A level surface can lack a tangent plane where \nabla F = \mathbf{0}: the cone x^2 + y^2 - z^2 = 0 has a vertex at the origin.

Where this goes next

By Result 3, an interior extreme of a differentiable function has \nabla f = \mathbf{0}, the start of Extrema and the second derivative test. On a constraint curve g = k, an extreme of f occurs where \nabla f is normal to the curve, hence parallel to \nabla g: the condition of Lagrange multipliers. The gradient attached to every point is a vector field, and integrating Result 1 along a curve gives the fundamental theorem for line integrals in Conservative fields and potential functions. Following -\nabla f in small steps is gradient descent, the basic method of numerical minimization.

Exercises

Directional derivatives

  1. Find the directional derivative of f(x, y) = 3x^2 - xy + y^3 at (1, 2) in the direction of \langle 1, 1 \rangle.
  2. Find the rate of change of f(x, y, z) = xy + yz^2 + z at (1, -1, 2) in the direction toward the point (3, 1, 3).
  3. For f(x, y) = xy^2 and \displaystyle \mathbf{u} = \left\langle \frac35, \frac45 \right\rangle, compute D_{\mathbf{u}} f(1, 1) from the definition, and compare it with \nabla f(1, 1) \cdot \mathbf{u}.

Steepest ascent and descent

  1. In which direction does f(x, y) = \ln(x^2 + y^2) increase fastest at (3, 4), and at what rate?
  2. A function f is differentiable at P, with D_{\mathbf{u}} f(P) = 2 for \displaystyle \mathbf{u} = \left\langle \frac35, \frac45 \right\rangle and D_{\mathbf{v}} f(P) = 1 for \displaystyle \mathbf{v} = \left\langle \frac45, -\frac35 \right\rangle. Find \nabla f(P) and the largest rate of change of f at P.
  3. Find the path of steepest descent of f(x, y) = 2x^2 + y^2 from (1, 2), as an equation in x and y.

Level curves and level surfaces

  1. Find the tangent line to the curve x^3 + xy + y^2 = 7 at (1, 2).
  2. Find the tangent plane and the normal line to the surface xy + yz + zx = 11 at (1, 2, 3).
  3. Find every point of the ellipsoid x^2 + 4y^2 + 2z^2 = 4 where the tangent plane is parallel to the plane x + 2y + 2z = 0, and the tangent plane at each.

In the sauna

  1. With the model of Example 2, Naomi’s head is at (1, -1, 1.2). At what rate does the temperature change as she leans horizontally, straight toward the stove’s axis?
  2. At Mei’s hand P = (2, 1, 1.5), find every horizontal unit vector along which the temperature does not change.

Proofs

  1. Prove from the definition, with no differentiability assumed, that if D_{\mathbf{u}} f(\mathbf{a}) exists then D_{-\mathbf{u}} f(\mathbf{a}) = -D_{\mathbf{u}} f(\mathbf{a}).
  2. Let f be differentiable at (a, b), with D_{\mathbf{u}} f(a, b) = D_{\mathbf{v}} f(a, b) = 0 for two unit vectors \mathbf{u} and \mathbf{v} that are not parallel. Prove that \nabla f(a, b) = \mathbf{0}.
  3. Let f be differentiable on \mathbb{R}^n with \nabla f(\mathbf{x}) = \mathbf{0} for every \mathbf{x}. Prove that f is constant.
  4. Prove that wherever a curve x^2 - y^2 = c meets a curve xy = d away from the origin, the two cross at right angles.
  5. Let \rho = \lVert \langle x, y, z \rangle \rVert and let n be a real number. Prove that at every point other than the origin, \nabla(\rho^n) = n\rho^{n - 2}\langle x, y, z \rangle.
  6. Refute: if D_{\mathbf{u}} f(\mathbf{a}) exists and equals \nabla f(\mathbf{a}) \cdot \mathbf{u} for every unit vector \mathbf{u}, then f is differentiable at \mathbf{a}. Use f(x, y) = \dfrac{x^4 y^2}{x^8 + y^4} with f(0, 0) = 0.
Answers
  1. \displaystyle \frac{15\sqrt2}{2} \approx 10.61. \nabla f = \langle 6x - y, -x + 3y^2 \rangle = \langle 4, 11 \rangle at (1, 2), and \displaystyle \mathbf{u} = \frac{1}{\sqrt2}\langle 1, 1 \rangle, so \displaystyle D_{\mathbf{u}} f = \frac{15}{\sqrt2}.
  2. \displaystyle \frac53. \nabla f = \langle y, x + z^2, 2yz + 1 \rangle = \langle -1, 5, -3 \rangle, and the direction \langle 2, 2, 1 \rangle has length 3, so the rate is \displaystyle \frac{-2 + 10 - 3}{3}.
  3. \displaystyle \frac{11}{5} both ways. \displaystyle g(t) = \left(1 + \frac35 t\right)\left(1 + \frac45 t\right)^2 has \displaystyle g'(0) = \frac35 + 2 \cdot \frac45 = \frac{11}{5}, and \nabla f(1, 1) = \langle y^2, 2xy \rangle = \langle 1, 2 \rangle gives \displaystyle \frac35 + \frac85.
  4. In the direction \displaystyle \left\langle \frac35, \frac45 \right\rangle, at rate \displaystyle \frac25. \displaystyle \nabla f = \frac{\langle 2x, 2y \rangle}{x^2 + y^2} = \left\langle \frac{6}{25}, \frac{8}{25} \right\rangle, of length \displaystyle \frac{10}{25}.
  5. \nabla f(P) = \langle 2, 1 \rangle, largest rate \displaystyle \sqrt5. With \nabla f(P) = \langle A, B \rangle, Result 2 gives 3A + 4B = 10 and 4A - 3B = 5, so A = 2 and B = 1.
  6. The arc \displaystyle x = \frac{y^2}{4} for 0 < y \le 2, running to the minimum at the origin. With \mathbf{r}' = -\nabla f = \langle -4x, -2y \rangle, x = e^{-4t} and y = 2e^{-2t}, so y^2 = 4e^{-4t} = 4x.
  7. x + y = 3. The point is on the curve, since 1 + 2 + 4 = 7, and \nabla F = \langle 3x^2 + y, x + 2y \rangle = \langle 5, 5 \rangle there; the line is 5(x - 1) + 5(y - 2) = 0.
  8. The plane 5x + 4y + 3z = 22 and the line \mathbf{r}(t) = \langle 1 + 5t, 2 + 4t, 3 + 3t \rangle. \nabla F = \langle y + z, x + z, x + y \rangle = \langle 5, 4, 3 \rangle, and 5 + 8 + 9 = 22.
  9. At \displaystyle \left(1, \frac12, 1\right) the plane x + 2y + 2z = 4, and at \displaystyle \left(-1, -\frac12, -1\right) the plane x + 2y + 2z = -4. Parallel planes have parallel normals, so \langle 2x, 8y, 4z \rangle = \lambda\langle 1, 2, 2 \rangle, giving \displaystyle x = \frac{\lambda}{2}, \displaystyle y = \frac{\lambda}{4}, \displaystyle z = \frac{\lambda}{2}; substituting, \lambda^2 = 4.
  10. \displaystyle 3\sqrt2 \approx 4.24 degrees per meter. \nabla T(1, -1, 1.2) = \langle -2, 4, 7 \rangle, and the direction toward (0, 0, 1.2) is \displaystyle \frac{1}{\sqrt2}\langle -1, 1, 0 \rangle, so the rate is \displaystyle \frac{2 + 4}{\sqrt2}.
  11. \displaystyle \pm\frac{1}{\sqrt2}\langle 1, -1, 0 \rangle. By Result 3 the rate is 0 exactly when \mathbf{u} is perpendicular to \langle -4, -4, 7 \rangle, which for \mathbf{u} = \langle p, q, 0 \rangle means p + q = 0.
  12. Since -\mathbf{u} is a unit vector, D_{-\mathbf{u}} f(\mathbf{a}) is the limit of \displaystyle \frac{f(\mathbf{a} - t\mathbf{u}) - f(\mathbf{a})}{t} as t \to 0. With s = -t it is \displaystyle -\frac{f(\mathbf{a} + s\mathbf{u}) - f(\mathbf{a})}{s}, and s \to 0 exactly when t \to 0.
  13. Write \mathbf{g} = \nabla f(a, b). By Result 2, \mathbf{g} \cdot \mathbf{u} = \mathbf{g} \cdot \mathbf{v} = 0. Two vectors of \mathbb{R}^2 that are not parallel span it, so \mathbf{g} = \alpha\mathbf{u} + \beta\mathbf{v} for some numbers \alpha and \beta, and \lVert \mathbf{g} \rVert^2 = \alpha\,\mathbf{g} \cdot \mathbf{u} + \beta\,\mathbf{g} \cdot \mathbf{v} = 0.
  14. Fix \mathbf{a} and \mathbf{b} and let g(t) = f(\mathbf{a} + t(\mathbf{b} - \mathbf{a})). By Result 1, g is differentiable on \mathbb{R}, with g'(t) = \nabla f(\mathbf{a} + t(\mathbf{b} - \mathbf{a})) \cdot (\mathbf{b} - \mathbf{a}) = 0. By the mean value theorem (The mean value theorem) g is constant, so f(\mathbf{b}) = g(1) = g(0) = f(\mathbf{a}).
  15. Let F = x^2 - y^2 and G = xy, with \nabla F = \langle 2x, -2y \rangle and \nabla G = \langle y, x \rangle, nonzero away from the origin. By the implicit function theorem each curve is, near a common point, a differentiable graph, whose tangent direction is perpendicular to its gradient (Result 4): \langle 2y, 2x \rangle and \langle x, -y \rangle, with dot product 2xy - 2xy = 0.
  16. \rho^n = G(s) with s = x^2 + y^2 + z^2 > 0 and G(s) = s^{n/2}, differentiable for s > 0, and \nabla s = \langle 2x, 2y, 2z \rangle. By Result 6, \displaystyle \nabla(\rho^n) = \frac{n}{2}s^{n/2 - 1}\langle 2x, 2y, 2z \rangle = n\rho^{n - 2}\langle x, y, z \rangle, since s^{n/2 - 1} = \rho^{n - 2}.
  17. f(t, 0) = f(0, t) = 0, so \nabla f(0, 0) = \mathbf{0}. For \mathbf{u} = \langle p, q \rangle with q \ne 0, \displaystyle \frac{f(tp, tq)}{t} = \frac{tp^4q^2}{t^4p^8 + q^4} \to 0, and for q = 0 the quotient is 0; so D_{\mathbf{u}} f(0, 0) = 0 = \nabla f(0, 0) \cdot \mathbf{u} for every \mathbf{u}. But on the curve y = x^2, \displaystyle f = \frac{x^8}{2x^8} = \frac12 for x \ne 0, so f is not continuous at the origin and, by Result 1 of Tangent planes and linear approximation, not differentiable there.
math.wiki · CC-BY-SA-4.0