Directional Derivatives Examples 2

# Directional Derivatives Examples 2

Recall from the Directional Derivatives page that for a two variable real-valued function $z = f(x, y)$, the directional derivative of $f$ at a point $(x, y) \in D(f)$ in the direction of the unit vector $\vec{u} = (a, b)$ is given by the formula:

(1)
\begin{align} \quad D_{\vec{u}} \: f(x, y) = \frac{\partial z}{\partial x} a + \frac{\partial z}{\partial y} b \end{align}

For a three variable real-valued function $w = f(x, y, z)$, the directional derivative of $f$ at a point $(x, y, z) \in D(f)$ in the direction of the unit vector $\vec{u} = (a, b, c)$ is given by the formula:

(2)
\begin{align} \quad 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 \end{align}

We will now look at some examples of calculating directional derivatives. More examples can be found on the Directional Derivatives Examples 1 and Directional Derivatives Examples 3 pages.

## Example 1

Find the directional derivative of $z = f(x, y) = e^x \sin y$ at $\left ( 0, \frac{\pi}{3} \right )$ in the direction of the vector $\vec{v} = (-6, 8)$.

We first note that $\vec{v}$ is not a unit vector. Let's find a unit vector that goes in the direction of $\vec{v}$. We have that $\| \vec{v} \| = \sqrt{(-6)^2 + (8)^2} = \sqrt{36+64} = 10$, and so $\vec{u} = \left ( \frac{-6}{10}, \frac{8}{10} \right ) = \left ( \frac{-3}{5}, \frac{4}{5} \right )$ is a unit vector in the direction of $\vec{v}$.

Now we compute the partial derivatives of $f$. We have that $\frac{\partial z}{\partial x} = e^x \sin y$ and $\frac{\partial z}{\partial y} = e^x \cos y$. Therefore:

(3)
\begin{align} \quad D_{\vec{u}} \: f(x, y) = (e^x \sin y) \left ( \frac{-3}{5} \right ) + (e^x \cos y) \left ( \frac{4}{5} \right ) \\ \quad D_{\vec{u}} \: f\left (0, \frac{\pi}{3} \right) = \frac{-3 \sqrt{3}}{10} + \frac{4}{10} = \frac{-3\sqrt{3} + 4}{10} \end{align}

## Example 2

Find the directional derivative of $z = f(x, y) = x^4 - x^2y^3$ at $(2, 1)$ in the direction of the vector $\vec{v} = (1, 3)$.

We first note that $\vec{v}$ is not a unit vector. Let's find a unit vector that goes in the direction of $\vec{v}$. We have that $\| \vec{v} \| = \sqrt{(1)^2 + (3)^2} = \sqrt{10}$, and so $\vec{u} = \left (\frac{1}{\sqrt{10}}, \frac{3}{\sqrt{10}} \right )$ is a unit vector in the direction of $\vec{v}$.

Now we compute the partial derivatives of $f$. We have that $\frac{\partial z}{\partial x} = 4x^3 -2xy^3$ and $\frac{\partial z}{\partial y} = -3x^2y^2$. Therefore:

(4)
\begin{align} \quad D_{\vec{u}} \: f(x, y) = (4x^3 -2xy^3) \left ( \frac{1}{\sqrt{10}} \right ) + (-3x^2y^2) \left ( \frac{3}{\sqrt{10}} \right ) \\ \quad D_{\vec{u}} \: f(2,1) = \frac{28}{\sqrt{10}} - \frac{36}{\sqrt{10}} = \frac{-8}{\sqrt{10}} \end{align}

## Example 3

Find the directional derivative of $w = f(x, y, z) = xe^y + ye^z + ze^x$ at $(0, 0, 0)$ in the direction of the vector $\vec{v} = (5, 1, -2)$.

Once again, we note that $\vec{v}$ is not a unit vector, so let's find a unit vector that goes in the direction of $\vec{v}$. We have that $\| \vec{v} \| = \sqrt{(5)^2 + (1)^2 + (-2)^2} = \sqrt{30}$. So $\vec{u} = \left ( \frac{5}{\sqrt{30}}, \frac{1}{\sqrt{30}}, \frac{-2}{\sqrt{30}} \right)$ is a unit vector in the direction of $\vec{v}$.

Now we compute the partial derivatives of $f$. We have that $\frac{\partial w}{\partial x} = e^y + ze^x$, $\frac{\partial w}{\partial y} = xe^y + e^z$, and $\frac{\partial w}{\partial z} = ye^z + e^x$. Therefore:

(5)
\begin{align} \quad D_{\vec{u}} \: f(x, y, z) = (e^y + ze^x) \left ( \frac{5}{\sqrt{30}} \right) + (xe^y + e^z) \left ( \frac{1}{\sqrt{30}} \right) + (ye^z + e^x) \left ( \frac{-2}{\sqrt{10}} \right ) \\ \quad D_{\vec{u}} \: f(0,0,0) = \frac{5}{\sqrt{30}} + \frac{1}{\sqrt{30}} - \frac{2}{\sqrt{30}} = \frac{4}{\sqrt{30}} \end{align}