Week 8 Discussion Notes

Table of Contents

Directional Derivatives

In 1D, if you had a function f(x)f\p{x}, then the derivative dfdx\deriv{f}{x} tells you how much ff (the "height") changes when you move a little bit in the positive xx direction.

With multiple variables, though, you have a lot more directions to work with, but the interpretation is the same:

Duf(a,b)=f(a,b)uuD_{\vec{u}}f\p{a, b} = \nabla f\p{a, b} \cdot \frac{\vec{u}}{\norm{\vec{u}}}

Duf(a,b)D_{\vec{u}}f\p{a, b} tells you how much ff (the "height") changes when you move a little bit in the direction specified by the vector u\vec{u}. Since this is a dot product, you already have another, more geometric formula for the directional derivative:

Duf(a,b)=f(a,b)cosθ.D_{\vec{u}}f\p{a, b} = \norm{\nabla f\p{a, b}} \cos{\theta}.

θ\theta is the angle between f(a,b)\nabla f\p{a, b} and the vector u\vec{u}. Recall that cosθ\cos{\theta} is between 1-1 and 11, where cos0=1\cos{0} = 1 and cosπ=1\cos{\pi} = -1. So, you immediately get two interesting interpretations of the gradient:

  1. The maximum rate of increase is in the direction f(a,b)\nabla f\p{a, b}.
  2. The maximum rate of decrease is in the direction f(a,b)-\nabla f\p{a, b}.

Another interesting case is when cosθ=0\cos{\theta} = 0, where θ=π2\theta = \frac{\pi}{2}, i.e., when f(a,b)\nabla f\p{a, b} is orthogonal to u\vec{u}. In this case, Duf(a,b)=0D_{\vec{u}}f\p{a, b} = 0, i.e., if you move a little bit in a direction orthogonal to f(a,b)\nabla f\p{a, b}, then ff (essentially) stays constant. However, if you stay at the same height, that means you're moving along a level curve. This tells you another interpretation of the gradient:

The gradient of ff is orthogonal to the level curves of ff.

These pictures gives a rough summary of the concepts:

Using the interpretation that the gradient is orthogonal to level curves, you'll be able to find normal vectors for tangent planes much more easily.

Example 1.

If a surface is defined by F(x,y,z)=cF\p{x, y, z} = c, i.e., is a level curve of the function FF, then you already know that F\nabla F will be orthogonal to this surface. Thus, you can use

n=F\vec{n} = \nabla F

as your normal vector.

Example 2.

As a special case, if you have a surface defined by z=f(x,y)z = f\p{x, y}, then you can view it as a level curve:

F(x,y,z)=f(x,y)z=0F\p{x, y, z} = f\p{x, y} - z = 0

Then as in the previous example, you can use

n=F=fx,fy,1,\vec{n} = \nabla F = \ang{\pderiv{f}{x}, \pderiv{f}{y}, -1},

which coincides with the normal vector we've been using for surfaces.

Example 3.

Find a normal vector to the surface x2+y2+z2=1x^2 + y^2 + z^2 = 1 at the point (a,b,c)\p{a, b, c}.

Solution.

In this problem, F(x,y,z)=x2+y2+z2F\p{x, y, z} = x^2 + y^2 + z^2 and the surface is a level surface of FF. Thus, we can use

n=F(a,b,c)=2a,2b,2c.\vec{n} = \nabla F\p{a, b, c} = \boxed{\ang{2a, 2b, 2c}}.

Chain Rule

Theorem

Let f(x,y)f\p{x, y} be differentiable, and suppose x=x(s,t)x = x\p{s, t} and y=y(s,t)y = y\p{s, t}. Then

fs=fxxs+fyys.\pderiv{f}{s} = \pderiv{f}{x} \pderiv{x}{s} + \pderiv{f}{y} \pderiv{y}{s}.

So to find fs\pderiv{f}{s}, you just need to find all the variables of ff that depend on ss and multiply out the partial derivatives. This generalizes to more complicated situations:

Example 4.

Let f(x,y,z)f\p{x, y, z} be differentiable, x=x(s,t)x = x\p{s, t}, and z=z(s)z = z\p{s} (so yy is independent of s,ts, t). Calculate the partial derivatives

fsandft.\pderiv{f}{s} \quad\text{and}\quad \pderiv{f}{t}.
Solution.

For fs\pderiv{f}{s}, only xx and zz depend on ss, so we get

fs=fxxs+fzzs.\boxed{\pderiv{f}{s} = \pderiv{f}{x} \pderiv{x}{s} + \pderiv{f}{z} \pderiv{z}{s}}.

Similarly, for ft\pderiv{f}{t}, only xx depends on tt, so

ft=fxxt.\boxed{\pderiv{f}{t} = \pderiv{f}{x} \pderiv{x}{t}}.
Example 5.

Derive the formula

ddtf(r(t))=f(r(t))r(t).\deriv{}{t} f\p{\vec{r}\p{t}} = \nabla f\p{\vec{r}\p{t}} \cdot \vec{r}'\p{t}.
Solution.

We can write

r(t)=x(t),y(t),\vec{r}\p{t} = \ang{x\p{t}, y\p{t}},

so this becomes finding the derivative ddtf(x,y)\deriv{}{t} f\p{x, y} with x=x(t)x = x\p{t} and y=y(t)y = y\p{t}:

ddtf(x,y)=fxdxdt+fydydt=fx,fydxdt,dydt=f(r(t))r(t).\begin{aligned} \deriv{}{t} f\p{x, y} &= \pderiv{f}{x} \deriv{x}{t} + \pderiv{f}{y} \deriv{y}{t} \\ &= \ang{\pderiv{f}{x}, \pderiv{f}{y}} \cdot \ang{\deriv{x}{t}, \deriv{y}{t}} \\ &= \nabla f\p{\vec{r}\p{t}} \cdot \vec{r}'\p{t}. \end{aligned}