Directional Derivatives

Directional Derivatives

We will now look at a new type of derivative known as a directional derivative.

Directional Derivatives of Two Variable Functions

Let $z = f(x, y)$ be a two variable real-valued function. Recall from the Partial Derivatives page that the partial derivative $\frac{\partial z}{\partial x} = \lim_{h \to 0} \frac{f(a + h, b) - f(a, b)}{h}$ represented the rate of change of $z$ in the $x$-direction at any point $P(a, b, f(a,b))$ for $(a, b) \in D(f)$ by giving us the slope of the tangent line obtained by the curve of intersection of $S$ with the plane $y = b$ at point $P$. Similarly, the partial derivative $\frac{\partial z}{\partial y} = \lim_{h \to 0} \frac{f(a, b + h) - f(a,b)}{h}$ represented the rate of change of $z$ in the $y$-direction at any point $P(a, b, f(a,b))$ for $(a, b) \in D(f)$ by giving us the slope of the tangent line obtained by the curve of intersection of $S$ with the plane $x = a$ at point $P$.

Correspondingly, $\frac{\partial z}{\partial x}$ tells us the rate of change of [[ in the direction of the unit vector $\vec{i}$ while $\frac{\partial z}{\partial y}$ tells us the rate of change of $y$ in the direction of the unit vector $\vec{j}$.

We will now extend this idea further. Let $z = f(x, y)$ be a two variable real-valued function that generates the surface $S$, and let $z_0 = f(x_0, y_0)$ be the point $P(x_0, y_0, z_0)$ that lies on $S$. Let $\vec{u} = (a, b)$ be an arbitrary unit vector ($\| \vec{u} \| = 1$). Consider a vertical plane $\Pi$ that passes through $P$ that is in the direction of $\vec{u}$. This plane $\Pi$ intersects the surface $S$ to form a curve $C$ that contains $P$. The slope of the tangent line $T$ on $C$ at $P$ represents the rate of change of $z$ in the direction of the arbitrary vector $\vec{u}$.

Let $Q(x,y,z)$ be another point on the curve $C$, and let $P'(x_0, y_0, 0)$ and $Q'(x,y,0)$ be the projections of $P$ and $Q$ onto the $xy$-plane. As we can see, the vector $\vec{P'Q'}$ with reduced coordinates $\vec{P'Q'} = (x - x_0, y - y_0)$ goes in the same direction as $\vec{u} = (a, b)$ and so $\vec{P'Q'} = (x - x_0, y - y_0) = h\vec{u} = h(a, b) = (ha, hb)$ for some scalar $h$ as illustrated in the following diagram.

Screen%20Shot%202014-12-27%20at%203.27.48%20AM.png

Therefore $x = x_0 + ha$ and $y = y_0 + hb$. So if $\Delta z = z - z_0$ (that is the change in $z$ coordinate from $Q(x, y, z)$ to $P(x_0, y_0, z_0)$) then:

(1)
\begin{align} \frac{\Delta z}{h} = \frac{z - z_0}{h} = \frac{f(x_0 + ha, y_0 + hb) - f(x_0, y_0)}{h} \end{align}
Definition: Let $z = f(x, y)$ be a two variable real-valued function. Then the Directional Derivative of $f$ at $(x_0, y_0) \in D(f)$ in the direction of the unit vector $\vec{u} = (a, b)$ is defined as $D_{\vec{u}} \: f(x_0, y_0) = \lim_{h \to 0} \frac{f(x_0 + ha, y_0 + hb) - f(x_0, y_0)}{h}$ provided this limit exists.

If the unit vector $\vec{u} = (a, b)$ is denoted in bold as $\mathbf{u}$ then the notation for the directional derivative of $f$ at $(x_0, y_0) \in D(f)$ in the direction of $\mathbf{u}$ is denoted $D_{\mathbf{u}} \: f(x_0, y_0)$.

One important note that we should mention is that the partial derivatives $\frac{\partial z}{\partial x}$ and $\frac{\partial z}{\partial y}$ are both directional derivatives in the directions of $\vec{i}$ and $\vec{j}$ as we've noted above, that is:

(2)
\begin{align} \frac{\partial z}{\partial x} = D_{\vec{i}} \: f(x,y) \\ \frac{\partial z}{\partial y} = D_{\vec{j}} \: f(x,y) \end{align}

Let's look at an example of computing a directional derivative using the definition. Consider the function $z = f(x, y) = x + y^2$ and the point $(1, 1) \in D(f)$, and suppose that wanted to compute the directional derivative of $f$ at $(1, 1)$ in the direction of the unit vector $\vec{u} = \left (\frac{3}{5}, \frac{4}{5} \right)$. Therefore:

(3)
\begin{align} \quad D_{\vec{u}} \: f(x_0, y_0) = \lim_{h \to 0} \frac{f(x_0 + ha, y_0 + hb) - f(x_0, y_0)}{h}\\ \quad D_{\vec{u}} \: f (1, 1) = \lim_{h \to 0} \frac{f(1 + \frac{3}{5}h, 1 + \frac{4}{5}h) - f(1, 1)}{h} \\ \quad D_{\vec{u}} \: f (1, 1) = \lim_{h \to 0} \frac{\left [ \left ( 1 + \frac{3}{5}h \right ) + \left ( 1 + \frac{4}{5}h \right)^2 \right ] - [2]}{h} \\ \quad D_{\vec{u}} \: f(1, 1) = \lim_{h \to 0} \frac{\frac{11}{5}h + \frac{16}{25}h^2}{h} \\ \quad D_{\vec{u}} \: f(1, 1) = \lim_{h \to 0} \frac{11}{5} + \frac{16}{25}h \\ \quad D_{\vec{u}} \: f(1, 1) = \frac{11}{5} \end{align}

Of course, computing directional derivatives using limits can be tedious. Fortunately, there is an easier way to compute directional derivatives.

Theorem 1: If $z = f(x, y)$ is a differentiable function of the variables $x$ and $y$, then for any unit vector $\vec{u} = (a, b)$, the directional derivative of $f$ at $(x, y) \in D(f)$ in the direction of $\vec{u}$ is given by $D_{\vec{u}} \: f(x, y) = \frac{\partial z}{\partial x} a + \frac{\partial z}{\partial y} b = \left ( \frac{\partial z}{\partial x}, \frac{\partial z}{\partial y} \right ) \cdot (a, b)$.
  • Proof: Let $g(h) = f(x_0 + ha, y_0 + hb)$ be a single variable function in terms of $h$. The derivative $g'(0)$ can be computed as:
(4)
\begin{align} g'(0) = \lim_{h \to 0} \frac{g(h) - g(0)}{h} \\ g'(0) = \lim_{h \to 0} \frac{f(x_0 + ha, y_0 + hb) - f(x_0, y_0)}{h} \\ g'(0) = D_{\vec{u}} \: f(x_0, y_0) \end{align}
  • Let $x = x_0 + ha$ and $y = y_0 + hb$ both be parametric equations of the parameter $h$. Then $g(h) = f(x, y)$. If we use the chain rule type 1 on $g(h) = f(x,y)$ and note that $\frac{d}{dh} x = \frac{d}{dh} (x_0 + ha) = a$ and $\frac{d}{dh} y = \frac{d}{dh} (y_0 + hb) = b$ we get that:
(5)
\begin{align} \quad \quad g'(h) = \frac{\partial f}{\partial x} \frac{dx}{dh} + \frac{\partial f}{\partial y} \frac{dy}{dh} = \frac{\partial f}{\partial x} a + \frac{\partial f}{\partial y} b = f_x(x, y)a + f_y (x, y) b \end{align}
  • Now we let $h = 0$ so that $x = x_0$ and $y = y_0$ and so:
(6)
\begin{equation} g'(0) = f_x(x_0, y_0)a + f_y(x_0, y_0)b \end{equation}
  • So we have that both $g'(0) = D_{\vec{u}} \: f (x_0, y_0)$ and $g'(0) = f_x(x_0, y_0)a + f_y(x_0, y_0)b$ so we conclude that:
(7)
\begin{align} \quad D_{\vec{u}} \: f (x_0, y_0) = f_x(x_0, y_0)a + f_y(x_0, y_0)b \\ \quad D_{\vec{u}} \: f (x, y) = f_x (x, y) a + f_y (x, y) = \frac{\partial z}{\partial x} a + \frac{\partial z}{\partial y} b = \left ( \frac{\partial z}{\partial x}, \frac{\partial z}{\partial y} \right ) \cdot (a, b) \quad \blacksquare \end{align}

Directional Derivatives of Three Variable Functions

Definition: Let $w = f(x, y, z)$ be a three variable real-valued function. Then the Directional Derivative of $f$ at $(x_0, y_0, z_0) \in D(f)$ in the direction of the unit vector $\vec{u} = (a, b, c)$ is defined as $D_{\vec{u}} \: f(x_0, y_0, z_0) = \lim_{h \to 0} \frac{f(x_0 + ha, y_0 + hb, z_0 + hc) - f(x_0, y_0, z_0)}{h}$ provided this limit exists.

Theorem 1 can also be extended for directional derivatives of three variables.

Theorem 2: If $w = f(x, y, z)$ is a differentiable function of the variables $x$, $y$, and $z$ then for any unit vector $\vec{u} = (a, b, c)$, the directional derivative of $f$ at $(x, y, z) \in D(f)$ in the direction of $\vec{u}$ is given by $D_{\vec{u}} \: f(x, y, z) = \frac{\partial w}{\partial x} a + \frac{\partial w}{\partial y} b + \frac{\partial w}{\partial z} c = \left ( \frac{\partial w}{\partial x}, \frac{\partial w}{\partial y}, \frac{\partial w}{\partial z} \right ) \cdot (a, b, c)$.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License