Directional Derivatives Examples 1

Directional Derivatives Examples 1

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 2 pages.

Example 1

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

We first note that $\vec{v} = (1, 4)$ is not a unit vector, since $\| \vec{v} \| = \sqrt{1^2 + 4^2} = \sqrt{17} \neq 1$. Thus let $\vec{u} = \left ( \frac{1}{\sqrt{17}}, \frac{4}{\sqrt{17}} \right)$, which is a unit vector in the same direction as $\vec{v}$.

Now the partial derivatives of this function are $\frac{\partial z}{\partial x} = 2ex \cos y - \frac{2y^2}{x}$, and $\frac{\partial z}{\partial y} = -ex^2 \sin y - 4 \ln (x) y$. Therefore we have that:

(3)
\begin{align} \quad \quad D_{\vec{u}} \: f(x, y) = \frac{\partial z}{\partial x} a + \frac{\partial z}{\partial y} b \\ \quad \quad D_{\vec{u}} \: f(x, y) = \left [ 2ex \cos y - \frac{2y^2}{x} \right ] \cdot \left [ \frac{1}{\sqrt{17}} \right ] + \left [ -ex^2 \sin y - 4 \ln (x) y \right ] \cdot \left [ \frac{4}{\sqrt{17}} \right ] \end{align}

Example 2

Find the directional derivative of $z = f(x, y) = \frac{x^2 - y^2}{x^2 + y^2}$ in the direction of the unit vector $\vec{u}$ whose angle $\theta = \frac{\pi}{3}$ with the positive $x$-axis when positioned at the origin.

We note that the angle if $\vec{u} = (\cos \theta, \sin \theta)$ then $\| \vec{u} \| = \sqrt{\cos ^2 \theta + \sin ^2 \theta} = 1$. Therefore, $\vec{u} = \left ( \cos \frac{\pi}{3}, \sin \frac{\pi}{3} \right ) = \left ( \frac{1}{2}, \frac{\sqrt{3}}{2} \right )$ is the unit vector whose angle $\theta = \frac{\pi}{3}$ with the positive $x$-axis when positioned at the origin.

Now the partial derivatives of $f$ are $\frac{\partial z}{\partial x} = \frac{(x^2 + y^2)(2x) - (x^2 - y^2)(2x)}{(x^2 + y^2)^2}$ and $\frac{\partial z}{\partial y} = \frac{(x^2 + y^2)(-2y) - (x^2 - y^2)(2y)}{(x^2 + y^2)^2}$. Therefore we have that:

(4)
\begin{align} \quad \quad D_{\vec{u}} \: f(x, y) = \left [ \frac{(x^2 + y^2)(2x) - (x^2 - y^2)(2x)}{(x^2 + y^2)^2} \right ] \cdot \left [ \frac{1}{2} \right ] + \left [ \frac{(x^2 + y^2)(-2y) - (x^2 - y^2)(2y)}{(x^2 + y^2)^2} \right ] \cdot \left [ \frac{\sqrt{3}}{2} \right ] \end{align}

The answer above can be simplified drastically, but we will leave this to the reader.

Example 3

Let $w = f(x, y) = 2x^2y^4z$. Determine the rate of change of $w$ in the direction of the vector $\vec{u} = \left ( \frac{1}{\sqrt{14}}, \frac{2}{\sqrt{14}}, \frac{3}{\sqrt{14}} \right )$ at $(1, 2, 3) \in D(f)$.

We first note that $\vec{u}$ is already a unit vector.

The partial derivatives of $f$ are $\frac{\partial w}{\partial x} = 4xy^4z$, $\frac{\partial w}{\partial y} = 8x^2y^3z$, and $\frac{\partial w}{\partial z} = 2x^2y^4$. Therefore we have that:

(5)
\begin{align} \quad \quad D_{\vec{u}} \: f(x, y, z) = \left [ 4xy^4z \right] \left [ \frac{1}{\sqrt{14}} \right ] + \left [ 8x^2y^3z \right] \left [ \frac{2}{\sqrt{14}}\right ] + \left [ 2x^2y^4 \right] \left [ \frac{3}{\sqrt{14}}\right ] \\ \end{align}

Inputting $(1, 2, 3)$ and we get that:

(6)
\begin{align} \quad \quad D_{\vec{u}} \: f(1, 2, 3) = \left [ 192 \right] \left [ \frac{1}{\sqrt{14}} \right ] + \left [ 192 \right] \left [ \frac{2}{\sqrt{14}}\right ] + \left [ 32 \right] \left [ \frac{3}{\sqrt{14}}\right ] \\ \quad \quad D_{\vec{u}} \: f(1, 2, 3) = \frac{672}{\sqrt{14}} \end{align}
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License