Skip to main content

Section 10.1 Directional Derivatives

Subsection 10.1.1 Definition of Directional Derivatives

Partial derivatives took one variable and pretended that all other variables were constant. In that way, we got the rate of change in that variable. We could consider \(\frac{\del f}{\del x}\) the derivative of \(f\) when we move in the \(x\) axis direction. But why do we only need to move in the axis direction? Why can't we move in all directions and consider the rate of change?

Definition 10.1.1.

Let \(f: \RR^n \rightarrow \RR\) be a differentiable function and \(u\) a unit vector in \(\RR^n\text{.}\) The directional derivative of \(f\) in the direction \(u\) is written \(D_u f\) and given by a limit definition. Let \(v\) be a point in the domain of \(f\text{.}\)

\begin{equation*} D_u f(v) = \lim_{h \rightarrow 0} \frac{ f(v + hu) - f(v)}{h} \end{equation*}

The directional derivative, like the partial derivative, uses a single variable limit: we use the line in the direction \(u\) (as a local direction vector form the point \(v\)) to give a one-dimensional domain — a copy of \(\RR^1\text{.}\) Then we just differentiate along the line. In \(\RR^3\text{,}\) if \(u = e_1\text{,}\) the directional derivative is \(D_{e_1} f = \frac{\del f}{\del x}\text{;}\) if \(u = e_2\text{,}\) the directional derivative is \(D_{e_2} f = \frac{\del f}{\del y}\text{;}\) and if \(u = e_3\text{,}\) the directional derivative is \(D_{e_3} f = \frac{\del f}{\del z}\text{.}\)

Subsection 10.1.2 Calculating Directional Derivatives

Instead of calculating this limit every time, we have a nice tool for calculating directional derivatives.

If \((a,b)\) or \((a,b,c)\) are unit vectors in \(\RR^2\) and \(\RR^3\text{,}\) respectively, we can write the specific form of the proposition for low dimensions.

\begin{align*} D_{(a,b)} f(x,y) \amp = \frac{\del f}{\del x} a + \frac{\del f}{\del y} b\\ D_{(a,b,c)} f(x,y,z) \amp = \frac{\del f}{\del x} a + \frac{\del f}{\del y} b + \frac{\del f}{\del z} c \end{align*}

As we noted above, the directional derivatives in the axis directions give the partial derivatives, so this is an extension of the idea of partial derivatives.

\begin{align*} D_{(1,0)} f(x,y) \amp = \frac{\del f}{\del x}\\ D_{(0,1)} f(x,y) \amp = \frac{\del f}{\del y}\\ D_{(1,0,0)} f(x,y,z) \amp = \frac{\del f}{\del x}\\ D_{(0,1,0)} f(x,y,z) \amp = \frac{\del f}{\del y}\\ D_{(0,0,1)} f(x,y,z) \amp = \frac{\del f}{\del z} \end{align*}

Subsection 10.1.3 Examples of Directional Derivatives

Figure 10.1.3. The function \(f(x,y) = \sin (x^2 + y^2)\text{.}\)

Consider this function: \(f(x,y) = \sin (x^2 + y^2)\text{,}\) show in Figure 10.1.3. These are circular sine waves, like riples on a pond which never decrease in amplitude. We have

\begin{align*} D_{(1,0)} f(x,y) \amp = 2x \cos (x^2 + y^2)\\ D_{(0,1)} f(x,y) \amp = 2y \cos (x^2 + y^2)\\ D_{ \left( \frac{1}{\sqrt{5}} , \frac{2}{\sqrt{5}} \right) } f(x,y) \amp = \frac{2}{\sqrt{5}} x \cos (x^2 + y^2) + \frac{4}{\sqrt{5}}y \cos (x^2 + y^2)\\ D_{ \left( \frac{1}{\sqrt{5}} , \frac{2}{\sqrt{5}} \right) } f(\sqrt{\pi},\sqrt{\pi}) \amp = \frac{2}{\sqrt{5}} \sqrt{\pi} \cos (\pi + \pi) + \frac{4}{\sqrt{5}} \sqrt{\pi} \cos (\pi + \pi) = 6 \sqrt{ \frac{\pi}{5}} \end{align*}
Figure 10.1.5. The function \(f(x,y) = e^{-(x^2+y^2)}\sin (x^2 + y^2)\text{.}\)

If we wanted damped ripples instead, as in Figure 10.1.5, we would take \(f(x,y) = e^{-(x^2 + y^2)} \sin(x^2 + y^2)\text{.}\)

\begin{align*} D_{(a,b)} f(x,y) \amp = \left[ -2xe^{-(x^2+y^2)} \sin (x^2 + y^2) + 2xe^{-(x^2+y^2)} \cos (x^2 + y^2) \right] a\\ \amp \hspace{1cm} + \left[ -2ye^{-(x^2+y^2)} \sin (x^2 + y^2) + 2ye^{-(x^2+y^2)} \cos (x^2 + y^2) \right] b\\ D_{(a,b)} f(\sqrt{\pi},\sqrt{\pi}) \amp = \left[ -2\sqrt{\pi}e^{-(\pi+\pi)} \sin (\pi + \pi) + 2\sqrt{\pi}e^{-(\pi+\pi)} \cos (\pi + \pi) \right] a\\ \amp \hspace{1cm} + \left[ -2\sqrt{\pi}e^{-(\pi + \pi )} \sin (\pi + \pi ) + 2\sqrt{\pi}e^{-(\pi + \pi )} \cos (\pi + \pi) \right] b\\ \amp = \frac{2\sqrt{\pi}}{e^{2\pi}} \left[ \cos (2\pi) a + \cos (2\pi) b \right] = \frac{2 \sqrt{\pi} (a+b)}{e^{2\pi}} \end{align*}

Finally, look at what happens when we apply the length of a dot product to the directional derivative.

\begin{equation*} |D_u f| = |\nabla f \cdot u| = |\nabla f||u| \cos \theta \end{equation*}

The cosine term is maximized when the angle \(\theta =0\text{,}\) that is, when \(u\) is the unit vector in the same direction as \(\nabla f\text{.}\) That is, the greatest directional derivative, representing the direction of fastest change, is found in the direction of the gradient. This established the fact, which we claimed earlier, that the gradient points in the direction of greatest change.