Previously, we discussed
partial derivatives
and their utility in examining the change in a surface along the $x$- and $y$- directions as well as determining the equation of the tangent plane to a surface. The definition we had for these partial derivatives was
$$
\def\ihat{\mathbf{\hat{\mmlToken{mi}[mathvariant="bold"]{ı}}}}
\def\jhat{\mathbf{\hat{\mmlToken{mi}[mathvariant="bold"]{ȷ}}}}
\def\khat{\mathbf{\hat{k}}}
\newcommand{\pzi}[2][]{\dfrac{\partial #1}{\partial #2}}
\begin{align*}
f_x(x_0,y_0) &= \lim_{h\rightarrow 0} \dfrac{f(x_0 + h,y_0) - f(x_0,y_0)}{h} \\
\\
f_y(x_0,y_0) &= \lim_{h\rightarrow 0} \dfrac{f(x_0,y_0 + h) - f(x_0,y_0)}{h}
\end{align*} $$
and the values gave the rate of change of $z$ along the $\ihat$ and $\jhat$ directions.
The natural questions to ask is how do we determine the rate of change of $z$ with respect a different direction $\mathbf{u}$, one that does not happen to be aligned with one of our canonical unit vectors. To do this, we select a unit vector $\mathbf{u} = \langle\,u_1,u_2\,\rangle$ and use a variation on the definitions above:
Definition ¶
The directional derivative of $f$ at $(x_0,y_0)$ in the direction $\mathbf{u} = \langle\,u_1,u_2\,\rangle$ is
$$ D_\mathbf{u} f(x_0,y_0) = \lim_{h\rightarrow 0} \dfrac{f(x_0 + hu_1,y_0 + hu_2) - f(x_0,y_0)}{h} $$
if the limit exists.
Here $h$ serves as a scalar multiple of $\mathbf{u}$ and determines how much we move along the surface in the $\mathbf{u}$ direction.
The formulas for $f_x$ and $f_y$ can be found by taking $\mathbf{u} = \ihat = \langle\,1,0\,\rangle$ and $\mathbf{u}=\jhat=\langle\,0,1\,\rangle$, respectively. This means that the partial derivatives are just special cases of a directional derivative.
Theorem ¶
For a differentiable function $f(x,y)$, its direction derivative with respect to $\mathbf{u} = \langle\,u_1,u_2\,\rangle$ is given by
$$ D_\mathbf{u}f(x,y) = f_x(x,y)u_1 + f_y(x,y)u_2 $$
This means that we may easily compute the directional derivative with respect to $\mathbf{u}$ by utilizing first partials.
Find the directional derivative of
$$ f(x,y) = y\cos(xy) $$
at the point $(0,1)$ in the direction where the unit vector $\mathbf{u}$ makes an angle of $\theta = \frac{\pi}{4}$ with the positive $x$-axis.
For an angle of $\frac{\pi}{4}$, the unit vector $\mathbf{u} = \langle\,\cos\frac{\pi}{4},\sin\frac{\pi}{4}\,\rangle = \left\langle\,\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}\,\right\rangle$. We find that the first partials of $f$ are
$$ \begin{align*}
f_x(x,y) &= -y\sin(xy)\cdot(y) = -y^2\sin(xy) \\
\\
f_y(x,y) &= \cos(xy) - y\sin(xy)\cdot(x) = \cos(xy) - xy\sin(xy)
\end{align*} $$
We evaluate the first partials at $(1,0)$ to find
$$ \begin{align*}
f_x(0,1) &= -1^2\sin(0\cdot 1) = 0 \\
\\
f_y(0,1) &= \cos(0\cdot 1) - (0\cdot 1)\sin(0\cdot 1) = 1
\end{align*} $$
Using our directional derivative formula, we have
$$ \begin{align*}
D_\mathbf{u}f(0,1) &= f_x(0,1)\cos\frac{\pi}{4} + f_y(0,1)\sin\frac{\pi}{4} \\
\\
&= 0\cdot\frac{1}{\sqrt{2}} + 1\cdot\frac{1}{\sqrt{2}} \\
\\
&= \frac{1}{\sqrt{2}}
\end{align*} $$
In the previous example, we took advantage of the formula for the directional derivative with respect to $\mathbf{u}$. It is possible to rewrite this expression in a form that presents us with a very useful tool:
$$ \begin{align*}
D_\mathbf{u}f(x,y) &= f_x(x,y)u_1 + f_y(x,y)u_2 \\
\\
&= \left\langle\,f_x(x,y),f_y(x,y)\,\right\rangle\cdot\langle\,u_1,u_2\,\rangle \\
\\
&= \left\langle\,f_x(x,y),f_y(x,y)\,\right\rangle\cdot\mathbf{u}
\end{align*} $$
This is a dot product between a vector composed of the first partials of $f$ and $\mathbf{u}$. We will call this vector of first partials the
gradient of
$f$. The gradient of $f$ is the first of three special derivative operators we use in vector calculus (the other two being
divergence
and
curl
). These all have special notations associated with them using the $\nabla$ symbol, sometimes called the "del" operator. The gradient of $f$ is defined in the following way.
Definition ¶
For a differentiable function $f(x,y)$, we say that the gradient of $f$ is given by
$$ \mathbf{grad} f(x,y) = \nabla f(x,y) = \left\langle\,f_x(x,y),f_y(x,y)\,\right\rangle = \pzi[f]{x}\ihat + \pzi[f]{y}\jhat $$
Both notations $\mathbf{grad} f$ and $\nabla f$ see common usage (as well as the related notation to the divergence and curl when those come up), so you should get used to working with both.
The gradient vector is especially useful for discussing direction derivatives, since we can condense our expression for that to just
$$ D_\mathbf{u}f(x,y) = \nabla f(x,y)\cdot\mathbf{u} $$
Furthermore, this formula applies for gradients and direction derivatives of functions of higher dimension. If we have a function of three variables, this extends naturally to
$$ D_\mathbf{u}f(x,y,z) = \nabla f(x,y,z)\cdot\mathbf{u} $$
where now
$$ \nabla f(x,y,z) = \left\langle\,f_x,f_y,f_z\,\right\rangle = \pzi[f]{x}\ihat + \pzi[f]{y}\jhat + \pzi[f]{z}\khat $$
with the unit vector $\mathbf{u} = \langle\,u_1,u_2,u_3\,\rangle$.
Find the direction derivative of
$$ f(x,y,z) = x^2 y + y^2 z $$
at point $(1,2,3)$ in the direction $\mathbf{v} = \langle\,2,-1,2\,\rangle$.
The gradient of $f$ is given by
$$ \nabla f = \left\langle\,2xy,x^2+2yz,y^2\,\right\rangle $$
and so
$$ \nabla f(1,2,3) = \left\langle\,2(1)(2),(1)^2+2(2)(3),(2)^2\,\right\rangle = \langle\,4,13,4\,\rangle $$
We need to use a unit vector $\mathbf{u}$ in the same direction of $\mathbf{v}$ to compute the directional derivative, so after dividing $\mathbf{v}$ by its length we see that
$$ \mathbf{u} = \left\langle\,\frac{2}{3},-\frac{1}{3},\frac{2}{3}\,\right\rangle $$
and the directional derivative is given by
$$ D_\mathbf{u}f(1,2,3) = \langle\,4,13,4\,\rangle\cdot\left\langle\,\frac{2}{3},-\frac{1}{3},\frac{2}{3}\,\right\rangle = \frac{8-13+8}{3} = 1 $$
Directional derivatives allow us to find the change in a function $f$ along any direction. It is natural to ask if we can determine along which direction the change in the function is the greatest. This involves maximizing the value of the directional derivative. Since we have the formula
$$ D_\mathbf{u} = \nabla f\cdot\mathbf{u} $$
we recall the dot product identity $\mathbf{a}\cdot\mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta$ which we can apply to the directional derivative formula
$$ D_\mathbf{u} = \nabla f\cdot\mathbf{u} = |\nabla f||\mathbf{u}|\cos\theta = |\nabla f|\cos\theta $$
where the last equality follows because $\mathbf{u}$ is a unit vector $(|\mathbf{u}|=1)$. Since $\theta$ is the angle between $\nabla f$ and $\mathbf{u}$ and the maximum value of $\cos\theta$ is one when $\theta=0$, we see that it must be the case that $D_\mathbf{u}$ has a maximum value of $|\nabla f|$ and that this occurs when the unit vector is
in the same direction as the gradient
.
Theorem ¶
The gradient is the direction of steepest ascent.
Suppose $f$ is a differentiable function of more than one variable. The maximum value of the directional derivative $D_\mathbf{u}f(\mathbf{x})$ is $|\nabla f|$ and this value occurs when $\mathbf{u}$ is in the same direction as the gradient $\nabla f(\mathbf{x})$.
The temperature $T$ in a metal ball is inversely proportional to the distance from the center of the ball, which we take to be the origin. The temperature at the point $(1,2,2)$ is $120^\circ$.
The temperature function is given by
$$ T(x,y,z) = \frac{k}{\sqrt{x^2 + y^2 + z^2}} $$
since
inversely proportional
means that the function looks like $f(r) = \frac{k}{r}$ where $r$ is the distance from the origin. To find $k$, we apply the fact that $T(1,2,2) = 120^\circ$, so
$$ T(1,2,2) = \frac{k}{1^2 + 2^2 + 2^2} = 120 \qquad\Rightarrow\qquad k = 360 $$
Creative Commons Attribution-NonCommercial-ShareAlike 4.0
Attribution
You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
Noncommercial
You may not use the material for commercial purposes.
Share Alike
You are free to share, copy and redistribute the material in any medium or format. If you adapt, remix, transform, or build upon the material, you must distribute your contributions under the
same license
as the original.