Skip to main content
Mathematics LibreTexts

3.2.E: Directional Derivatives and the Gradient (Exercises)

  • Page ID
    78222
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Exercise \(\PageIndex{1}\)

    Suppose \(f: \mathbb{R}^{2} \rightarrow \mathbb{R}\) is defined by

    \[ f(x, y)=3 x^{2}+2 y^{2} . \nonumber \]

    Let

    \[ \mathbf{u}=\frac{1}{\sqrt{5}}(1,2) . \nonumber \]

    Find \(D_{\mathbf{u}} f(3,1)\) directly from the definition (3.2.2).

    Answer

    \(D_{\mathrm{u}} f(3,1)=\frac{26}{\sqrt{5}}\)

    Exercise \(\PageIndex{2}\)

    For each of the following functions, find the partial derivatives with respect to each variable.

    (a) \(f(x, y)=\frac{4 x}{x^{2}+y^{2}}\)

    (b) \(g(x, y)=4 x y^{2} e^{-y^{2}}\)

    (c) \(f(x, y, z)=3 x^{2} y^{3} z^{4}-13 x^{2} y\)

    (d) \(h(x, y, z)=4 x z e^{-\frac{1}{x^{2}+y^{2}+z^{2}}}\)

    (e) \(g(w, x, y, z)=\sin \left(\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}\right)\)

    Answer

    (a) \(f_{x}(x, y)=\frac{4 y^{2}-4 x^{2}}{\left(x^{2}+y^{2}\right)^{2}} ; f_{y}(x, y)=-\frac{8 x y}{\left(x^{2}+y^{2}\right)^{2}}\)

    (c) \(\begin{aligned}
    & f_{x}(x, y, z)=6 x y^{3} z^{4}-26 x y\\
    &f_{y}(x, y, z)=9 x^{2} y^{2} z^{4}-13 x^{2}\\
    &f_{z}(x, y, z)=12 x^{2} y^{3} z^{3}
    \end{aligned}\)

    (e) \[ g_{w}(w, x, y, z)=\frac{w \cos \left(\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}\right)}{\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}} \nonumber \]

    \[ g_{x}(w, x, y, z)=\frac{x \cos \left(\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}\right)}{\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}} \nonumber\]

    \[ g_{y}(w, x, y, z)=\frac{2 y \cos \left(\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}\right)}{\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}} \nonumber \]

    \[ g_{z}(w, x, y, z)=\frac{3 z \cos \left(\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}\right)}{\sqrt{w^{2}+x^{2}+2 y^{2}+3 z^{2}}} \nonumber \]

    Exercise \(\PageIndex{3}\)

    Find the gradient of each of the following functions.

    (a) \( f(x, y, z)=\sqrt{x^{2}+y^{2}+z^{2}}\)

    (b) \(g(x, y, z)=\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}}\)

    (c) \(f(w, x, y, z)=\tan ^{-1}(4 w+3 x+5 y+z)\)

    Answer

    (a) \(\nabla f(x, y, z)=\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}}(x, y, z)\)

    (c) \(\nabla f(w, x, y, z)=\frac{1}{1+(4 w+3 x+5 y+z)^{2}}(4,3,5,1)\)

    Exercise \(\PageIndex{4}\)

    Find \(D_{\mathbf{u}} f(\mathbf{c})\) for each of the following.

    (a) \(f(x, y)=3 x^{2}+5 y^{2}, \mathbf{u}=\frac{1}{\sqrt{13}}(3,-2), \mathbf{c}=(-2,1)\)

    (b) \(f(x, y)=x^{2}-2 y^{2}, \mathbf{u}=\frac{1}{\sqrt{5}}(-1,2), \mathbf{c}=(-2,3)\)

    (c) \(f(x, y, z)=\frac{1}{\sqrt{x^{2}+y^{2}+z^{2}}}, \mathbf{u}=\frac{1}{\sqrt{6}}(1,2,1), \mathbf{c}=(-2,2,1)\)

    Answer

    (a) \(D_{\mathbf{u}}(-2,1)=-\frac{56}{\sqrt{13}}\)

    (c) \(D_{\mathrm{u}}(-2,2,1)=-\frac{1}{9 \sqrt{6}}\)

    Exercise \(\PageIndex{5}\)

    For each of the following, find the directional derivative of \(f\) at the point \(\mathbf{c}\) in the direction of the specified vector \(\mathbf{w}\).

    (a) \( f(x, y)=3 x^{2} y, \mathbf{w}=(2,3), \mathbf{c}=(-2,1)\)

    (b) \(f(x, y, z)=\log \left(x^{2}+2 y^{2}+z^{2}\right), \mathbf{w}=(-1,2,3), \mathbf{c}=(2,1,1)\)

    (c) \(f(t, x, y, z)=t x^{2} y z^{2}, \mathbf{w}=(1,-1,2,3), \mathbf{c}=(2,1,-1,2)\)

    Answer

    (a) \(D_{\mathrm{u}} f(-2,1)=\frac{12}{\sqrt{13}},\) where \(\mathbf{u}=\frac{1}{\sqrt{13}}(2,3)\)

    (c) \(D_{\mathrm{u}} f(2,1,-1,2)=\frac{4}{\sqrt{15}}\), where \(\mathbf{u}=\frac{1}{\sqrt{15}}(1,-1,2,3)\)

    Exercise \(\PageIndex{6}\)

    A metal plate is heated so that its temperature at a point \((x,y)\) is

    \[ T(x, y)=50 y^{2} e^{-\frac{1}{5}\left(x^{2}+y^{2}\right)} . \nonumber \]

    A bug is placed at the point (2,1).

    (a) The bug heads toward the point (1,−2). What is the rate of change of temperature in this direction?

    (b) In what direction should the bug head in order to warm up at the fastest rate? What is the rate of change of temperature in this direction?

    (c) In what direction should the bug head in order to cool off at the fastest rate? What is the rate of change of temperature in this direction?

    (d) Make a plot of the gradient vectors and discuss what it tells you about the temperatures on the plate.

    Answer

    (a) \(-20 \sqrt{10} e^{-1}\)

    (b) Direction: \(\frac{1}{\sqrt{5}}(-1,2)\) ; Rate of change: \(40 \sqrt{5} e^{-1}\)

    (c) Direction: \(\frac{1}{\sqrt{5}}(1,-2)\) ; Rate of change: \(-40 \sqrt{5} e^{-1}\)

    Exercise \(\PageIndex{7}\)

    A heat-seeking bug is a bug that always moves in the direction of the greatest increasein heat. Discuss the behavior of a heat seeking bug placed on a metal plate heated so that the temperature at \((x,y)\) is given by

    \[ T(x, y)=100-40 x y e^{-\frac{1}{10}\left(x^{2}+y^{2}\right)} . \nonumber \]

    Exercise \(\PageIndex{8}\)

    Suppose \(g: \mathbb{R}^{2} \rightarrow \mathbb{R}\) is defined by

    \[ g(x, y)= \begin{cases}\frac{x y}{x^{2}+y^{2}}, & \text { if }(x, y) \neq(0,0), \\ 0, & \text { if }(x, y)=(0,0) .\end{cases} \nonumber \]

    We saw above that both partial derivatives of \(g\) exist at (0,0), although \(g\) is not continuous at (0,0).

    (a) Show that neither \(\frac{\partial g}{\partial x}\) nor \(\frac{\partial g}{\partial y}\) is continuous at (0,0).

    (b) Let

    \[ \mathbf{u}=\frac{1}{\sqrt{2}}(1,1) . \nonumber \]

    Show that \(D_{\mathbf{u}} g(0,0)\) does not exist. In particular, \(D_{\mathbf{u}} g(0,0) \neq \nabla g(0,0) \cdot \mathbf{u} .\)

    Exercise \(\PageIndex{9}\)

    Suppose the price of a certain commodity, call it commodity \(A\), is \(x\) dollars per unit and the price of another commodity, \(B\), is \(y\) dollars per unit. Moreover, suppose that \(d_{A}(x, y)\) represents the number of units of \(A\) that will be sold at these prices and \(d_{B}(x, y)\) represents the number of units of \(B\) that will be sold at these prices. These functions are known as the demand functions for \(A\) and \(B\).

    (a) Explain why it is reasonable to assume that \[ \frac{\partial}{\partial x} d_{A}(x, y)<0 \nonumber \]

    and

    \[ \frac{\partial}{\partial y} d_{B}(x, y)<0 \nonumber \]

    for all \((x,y)\).

    (b) Suppose the two commodities are competitive. For example, they might be two different brands of the same product. In this case, what would be reasonable assumptions for the signs of

    \[ \frac{\partial}{\partial y} d_{A}(x, y) \nonumber \]

    and

    \[ \frac{\partial}{\partial x} d_{B}(x, y) ? \nonumber \]

    (c) Suppose the two commodities complement each other. For example, commodity \(A\) might be a computer and commodity \(B\) a type of software. In this case, what would be reasonable assumptions for the signs of

    \[ \frac{\partial}{\partial y} d_{A}(x, y) \nonumber \]

    and

    \[ \frac{\partial}{\partial x} d_{B}(x, y) ? \nonumber \]

    Answer

    (b) \(\frac{\partial}{\partial y} d_{A}(x, y)>0, \frac{\partial}{\partial x} d_{B}(x, y)>0\)

    (c) \(\frac{\partial}{\partial y} d_{A}(x, y)<0, \frac{\partial}{\partial x} d_{B}(x, y)<0\)

    Exercise \(\PageIndex{10}\)

    Suppose \(P\left(x_{1}, x_{2}, \ldots, x_{n}\right)\) represents the total production per week of a certain factory as a function of \(x_1\), the number of workers, and other variables, such as the size of the supply inventory, the number of hours the assembly lines run per week, and so on. Show that average productivity

    \[ \frac{P\left(x_{1}, x_{2}, \ldots, x_{n}\right)}{x_{1}} \nonumber \]

    increases as \(x_1\) increases if and only if

    \[ \frac{\partial}{\partial x_{1}} P\left(x_{1}, x_{2}, \ldots, x_{n}\right)>\frac{P\left(x_{1}, x_{2}, \ldots, x_{n}\right)}{x_{1}} . \nonumber \]

    Exercise \(\PageIndex{11}\)

    Suppose \(f: \mathbb{R}^{n} \rightarrow \mathbb{R}\) is \(C^1\) on an open ball about the point \(\mathbf{c}\).

    (a) Given a unit vector \(\mathbf{u}\), what is the relationship between \(D_{\mathbf{u}} f(\mathbf{c})\) and \(D_{-\mathbf{u}} f(\mathbf{c})\)?

    (b) Is it possible that \(D_{\mathbf{u}} f(\mathbf{c}) > 0 \) for every unit vector \(\mathbf{u}\)?

    Answer

    (a) \(D_{-\mathrm{u}} f(\mathbf{c})=-D_{\mathrm{u}} f(\mathbf{c})\)

    (b) No


    This page titled 3.2.E: Directional Derivatives and the Gradient (Exercises) is shared under a CC BY-NC-SA 1.0 license and was authored, remixed, and/or curated by Dan Sloughter via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.