Skip to main content

Section 14.2 Directional derivatives and the gradient

Introduction goes here.
  • Suppose we’re at the point \((a,b)\) and we want to find the rate of change as we move in the direction of the unit vector \(\uv u=(\cos\theta,\sin\theta)\text{.}\) This is called the directional derivative of \(f\) in the direction of \(\uv u\text{,}\) and is written \(\DS\pdv{f}{\uv u}\text{.}\)
  • Limit form of the directional derivative:
    \begin{equation*} \pdv{f}{\uv{u}} = \limit{h\to 0} \frac{f(a+h\cos\theta,b+h\sin\theta)-f(a,b)}{h} \end{equation*}
    If we think of a function of multiple variables \(f(x,y)\) as a function with a vector input \(f(\bv{r})\) with \(\bv{r}=(x,y)\text{,}\) we can also write this as:
    \begin{equation*} \pdv{f}{\uv{u}} = \limit{h\to 0} \frac{f(\bv{r}+h\uv{u})-f(\bv{r})}{h} \end{equation*}
    This last notation also lets us extend the directional derivative to three or more dimensions.
  • Parametrize the line in the \(xy\)-plane:
    \begin{align*} x \amp = a + t\cos\theta\\ y \amp = b + t\sin\theta \end{align*}
    Differentiate \(f\) with respect to \(t\) using the Chain Rule:
    \begin{align*} \pdv{f}{t} \amp = \pdv{f}{x}\cdot\pdv{x}{t}+\pdv{f}{y}\cdot\pdv{y}{t}\\ \amp = \pdv{f}{x}\cos\theta + \pdv{f}{y}\sin\theta \end{align*}
    This is indeed \(\DS\pdv{f}{\uv{u}}\text{.}\)
  • A natural question is, in which direction does the function increase the fastest, that is, have the greatest directional derivative?
    Maximize with respect to \(\theta\) to find out, and use THIS to define the gradient.
    Let \(\DS D(\theta)=\pdv{f}{\uv{u}}=\pdv{f}{x}\cos\theta + \pdv{f}{y}\sin\theta\text{.}\) Then \(\DS\dv{D}{\theta}=-\pdv{f}{x}\sin\theta + \pdv{f}{y}\cos\theta\text{.}\) Setting this equal to zero gives \(\DS\tan\theta=\dfrac{\pdv*{f}{y}}{\pdv*{f}{x}}\text{.}\) Any vector \(\bv{v}\) for which this holds is parallel to the vector \(\DS\qty(\pdv{f}{x},\pdv{f}{y})\text{.}\) If \(\theta\) points such that \(\bv{v}\) points in the same direction as \(\DS\qty(\pdv{f}{x},\pdv{f}{y})\text{,}\) then the directional derivative is maximized.
    Define the gradient vector as the one whose direction points toward the direction of greatest increase and whose magnitude is the value of the directional derivative in that direction. In Cartesian coordinates we then have:
    \begin{equation*} \Grad f=\qty(\pdv{f}{x},\pdv{f}{y}) \end{equation*}

    Aside

  • Notice the directional derivative is then the dot product of the gradient and the unit vector! Thus the directional derivative can be written \(\DS\pdv{f}{\uv{u}}=\Grad f\cdot\uv{u}\text{.}\)
  • If we find the directional derivative in the directions of the basis vectors, we recover partial derivatives by projection:
    \begin{align*} \pdv{f}{\uv{x}}\amp = \Grad f\cdot(1,0)=\pdv{f}{x}\\ \pdv{f}{\uv{y}}\amp = \Grad f\cdot(0,1)=\pdv{f}{y} \end{align*}
  • Since the directional derivative is a dot product, we can also reason that it’s maximized when \(\uv{u}\) points in the same direction as the gradient, and minimized when \(\uv{u}\) points in the opposite direction as the gradient.
  • Differentiability in multiple dimensions: making sure the relative error between the function and its tangent plane goes to zero.