Skip to main content

Section 3.5 Week 3 Activity

Subsection 3.5.1 Contour Plots

Activity 3.5.1.

Draw the contour graph for \(f(x,y) = 3y - 4x^2\) using a range of contour values \(c = -4, -3, \ldots, 5, 6\text{.}\) Use the contour graphs to give a qualitative description of the graph.
Solution.
Figure 3.5.1. Countour Plot for \(3y - 4x^2\)
The graph looks like a sloped ridge. The ridge goes upward along the positive \(y\) axis and slopes down to either side in the positive and negative \(x\) directions.

Activity 3.5.2.

Draw the contour graph for \(f(x,y) = e^{x^2 + y^2} + 4\) using a range of contour values \(c = 5, 5.1, 5.2, \ldots, 5.9, 6\text{.}\) Use the contour graphs to give a qualitative description of the graph.
Solution.
Figure 3.5.2. Countour Plot for \(e^{x^2 + y^2}\)
The graph looks like a well with a curve bottom. Near the origin, there is a slowly growing circular depression. As the function moves away from the origin, the shape remains circular but the walls get steep very quickly.

Activity 3.5.3.

Draw the contour graph for \(f(x,y) = \frac{x}{\sin y}\) using a range of contour values \(c = 0, 0.3, 0.6, \ldots, 2.4, 2.7, 3\text{.}\) Use the contour graphs to give a qualitative description of the graph.
Solution.
Figure 3.5.3. Countour Plot for \(\frac{x}{\sin y}\)
The graph is a series of ridges, alternating between ridges that grow in the positive \(x\) direction and ridges that grow in the negative \(x\) direction. The graph is undefined between the ridges due to the zeros of sine in the denominator.

Activity 3.5.4.

Draw the contour graph for \(f(x,y) = \frac{x^2 + 1}{y^2 - 4}\) using a range of contour values \(c = 1, 2, \ldots 9, 10\text{.}\) Use the contour graphs to give a qualitative description of the graph.
Solution.
Figure 3.5.4. Countour Plot for \(\frac{x^2+1}{y^2-4}\)
Near the origin, the graph is a hill-shape which cascades down quickly in all directions. Approaching the lines \(y = \pm 2\text{,}\) the graph descends to \(-\infty\text{.}\) Away from the origin, the graph has very steep walls growing to infinity near the lines \(y = \pm 2\text{,}\) but they shrink down to a flat plane as the input moves farther from the origin in the \(y\) direction.

Subsection 3.5.2 Partial Derivatives

Activity 3.5.5.

Calculate this partial derivative.
\begin{equation*} \frac{\del}{\del x} 4x^2 - 4y^2 + 3xy + 4 \end{equation*}
Solution.
I differetiate in the \(x\) variable, treating other variables as constant.
\begin{align*} \frac{\del}{\del x} 4x^2 - 4y^2 + 3xy + 4 \amp = 8x - 0 + 3y = 8x + 3y \end{align*}

Activity 3.5.6.

Calculate this partial derivative.
\begin{equation*} \frac{\del}{\del y} \cos (3x^2 + 4y^2) \end{equation*}
Solution.
I differetiate in the \(y\) variable, treating other variables as constant.
\begin{align*} \frac{\del}{\del y} \cos (3x^2 + 4y^2) \amp = \frac{d}{du} \cos u \Bigg|_{u=3x^2 + 4y^2} \frac{d}{dy} (3x^2 + 4y^2) \\ \amp = -\sin u \Bigg|_{u = 3x^2 + 4y^2} (8y) = -8y \sin (3x^2 + 4y^2) \end{align*}

Activity 3.5.7.

Calculate this partial derivative.
\begin{equation*} \frac{\del}{\del z} \ln (xyz) \end{equation*}
Solution.
I differetiate in the \(z\) variable, treating other variables as constant.
\begin{align*} \frac{\del}{\del z} \ln (xyz) \amp = \frac{d}{du} \ln u \Bigg|_{u = xyz} \frac{\del}{\del z} xyz = \frac{1}{u} \Bigg|_{u = xyz} xy = \frac{xy}{xyz} = \frac{1}{z} \end{align*}

Activity 3.5.8.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del x^2} e^{x^2 + y^2} \end{equation*}
Solution.
I differetiate in the \(x\) variable twice, treating other variables as constant. I use the chain rule in the first step, and then the product rule and the chain rule for the second partial derivative.
\begin{align*} \frac{\del^2}{\del x^2} e^{x^2 + y^2} \amp = \frac{\del}{\del x} \left[ \frac{d}{du} e^u \Bigg|_{u = x^2 + y^2} \frac{\del}{\del x} (x^2 + y^2) \right]\\ \amp = \frac{\del}{\del x} \left[ e^u \Bigg|_{u = x^2 + y^2} (2x) \right] = \frac{\del}{\del x} 2xe^{x^2 + y^2}\\ \amp = \frac{\del}{\del x} (2x) (e^{x^2+y^2} + 2x \frac{\del}{\del x} e^{x^2 + y^2} \\ \amp = 2e^{x^2 + y^2} + 2x \frac{d}{du} e^u \Bigg|_{u = x^2 + y^2} \frac{\del}{\del x} (x^2 + y^2) \\ \amp = 2e^{x^2 + y^2} + 2x e^u \Bigg|_{u = x^2 + y^2} (2x) = 2e^{x^2 + y^2} + 4x^2 e^{x^2 + y^2}\\ \amp = (2+4x^2) e^{x^2 + y^2} \end{align*}

Activity 3.5.9.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del y^2} x^2 + 3y^2 + 4y^2 x^3 - 5x^3 y + 8y^4 \end{equation*}
Solution.
I differetiate in the \(y\) variable twice, treating other variables as constant.
\begin{gather*} \frac{\del^2}{\del y^2} x^2 + 3y^2 + 4y^2 x^3 - 5x^3 y + 8y^4 = \frac{\del}{\del y} \left[ 0 + 6y + 8yx^3 - 5x^3 + 32y^3 \right]\\ = 6 + 8x^3 - 0 + 96y^2 = 6 + 8x^3 + 96y^2 \end{gather*}

Activity 3.5.10.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del z^2} xyz + x^2yz - xy^2z - xyz^2 \end{equation*}
Solution.
I differetiate in the \(z\) variable twice, treating other variables as constant.
\begin{align*} \frac{\del^2}{\del z^2} xyz + x^2yz - xy^2z - xyz^2 \amp = \frac{\del}{\del z} \left[ xy + x^2y - xy^2 + 2xyz \right] \\ = 0 + 0 - 0 + 2xy = 2xy \end{align*}

Activity 3.5.11.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del x \del y} \sin (xy) \end{equation*}
Solution.
I differetiate in \(y\) and then in \(x\text{,}\) in each step treating other variables as constant. I use the chain rule in the first derivative, then product rule and chain rule in the second derivative.
\begin{align*} \frac{\del^2}{\del x \del y} \sin (xy) \amp = \frac{\del}{\del x} \left[ \frac{d}{du} \sin u \Bigg|_{u = xy} \frac{\del}{\del y} xy \right] \\ \amp = \frac{\del}{\del x} \left[ \cos u \Bigg|_{u = xy} (x) = \frac{\del}{\del x} x \cos (xy) \right] \\ \amp = \left( \frac{\del}{\del x} x \right) \cos (xy) + x \frac{\del}{\del x} \cos xy \\ \amp = 1 \cos (xy) + x \frac{d}{du} \cos u \Bigg|_{u = xy} \frac{\del}{\del x} xy \\ \amp = \cos (xy) - x \sin u \Bigg|_{u = xy} (y) = \cos (xy) - xy \sin (xy) \end{align*}

Activity 3.5.12.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del x \del y} \frac{1}{x^2 + y^2 + 3} \end{equation*}
Solution.
I differetiate in \(y\) and then in \(x\text{,}\) in each step treating other variables as constant. I use the chain rule in the first step, and then the quotient rule in the second.
\begin{align*} \frac{\del^2}{\del x \del y} \frac{1}{x^2 + y^2 + 3} \amp = \frac{\del}{\del x} \left[ \frac{d}{du} \frac{1}{u} \Bigg|_{u = x^2 + y^2 + 3} \frac{\del}{\del y} (x^2 + y^2 + 3) \right] \\ \amp = \frac{\del}{\del x} \left[ \frac{-1}{u^2} \Bigg|_{u = x^2 + y^2 +3} (2y) \right] = \frac{\del}{\del x} \left[ \frac{-2y}{(x^2 + y^2 + 3)^2} \right] \\ \amp = \frac{(x^2 + y^2 + 3)\frac{\del}{\del x} (-2y) + 2y \frac{\del}{\del x} (x^2 +y^2 +3)}{(x^2 + y^2 + 3)^4} \\ \amp = \frac{0 + (2y)(2x)}{(x^2 + y^2 + 3)^4} = \frac{4xy}{(x^2 + y^3 + 3)^4} \end{align*}

Activity 3.5.13.

Calculate this partial derivative.
\begin{equation*} \frac{\del^2}{\del x \del y} x^2 y^3 - 7x^4y^3 - x^5 + 3y^7 \end{equation*}
Solution.
I differetiate in \(y\) and then in \(x\text{,}\) in each step treating other variables as constant.
\begin{align*} \frac{\del^2}{\del x \del y} x^2 y^3 - 7x^4y^3 - x^5 + 3y^7 \amp = \frac{\del}{\del x} \left[ 3x^2y^2 - 21x^4y^2 - 0 + 21y^6 \right] \\ \amp = 6xy^2 - 84x^3y^2 - 0 + 0 = 6xy^2 - 84x^3y^2 \end{align*}

Activity 3.5.14.

Calculate this partial derivative.
\begin{equation*} \frac{\del^3}{\del x \del y \del z} 3xyz - xy^2 - xz^2 + yz^2 \end{equation*}
Solution.
I differetiate in \(z\text{,}\) then in \(y\text{,}\) and then in \(z\text{,}\) in each step treating other variables as constant.
\begin{align*} \frac{\del^3}{\del x \del y \del z} 3xyz - xy^2 - xz^2 + yz^2 \amp = \frac{\del^2}{\del x \del y} \left[ 3xy - 0 - 2xy + 2yz \right] \\ \amp = \frac{\del}{\del x} \left[ 3x - 2x + 2z \right] = 3 - 2 = 0 = 1 \end{align*}

Activity 3.5.15.

Calculate this partial derivative.
\begin{equation*} \frac{\del^3}{\del x \del y^2} x^2 e^y - xy^2 \end{equation*}
Solution.
I differetiate in \(y\) twice and the in \(x\text{,}\) in each step treating other variables as constant.
\begin{align*} \frac{\del^3}{\del x \del y^2} x^2 e^y - xy^2 \amp = \frac{\del^2}{\del x \del y} x^2 e^y - 2xy \\ \amp = \frac{\del}{\del x} x^2e^y - 2x = 2xe^y - 2 \end{align*}

Subsection 3.5.3 Gradients

Activity 3.5.16.

Calculate the gradient of this function. Use the countour plots from the activity from Week 8 and draw some of the gradient directions, showing that the gradients are indeed perpendicular to the coutour plots.
\begin{equation*} f(x,y) = 3y - 4x^2 \end{equation*}
Solution.
I calculate the two partial derivative.
\begin{gather*} \frac{\del}{\del x} f(x,y) = -8x \\ \frac{\del}{\del y} f(x,y) = 3 \end{gather*}
The gradient has these two as components.
\begin{equation*} \nabla f(x,y) = (-8x,3) \end{equation*}
I’ve chosen some points and drawn the gradients in Figure 3.5.5
Figure 3.5.5. \(\nabla 3y - 4x^2\)

Activity 3.5.17.

Calculate the gradient of this function. Use the countour plots from the activity from Week 8 and draw some of the gradient directions, showing that the gradients are indeed perpendicular to the coutour plots.
\begin{equation*} f(x,y) = e^{x^2 + y^2} + 4 \end{equation*}
Solution.
I calculate the two partial derivative.
\begin{gather*} \frac{\del}{\del x} f(x,y) = 2xe^{x^2 + y^2}\\ \frac{\del}{\del y} f(x,y) = 2ye^{x^2 + y^2} \end{gather*}
The gradient has these two as components.
\begin{equation*} \nabla f(x,y) = (2xe^{x^2 + y^2}, 2ye^{x^2 + y^2}) \end{equation*}
I’ve chosen some points and drawn the gradients in Figure 3.5.6
Figure 3.5.6. \(\nabla e^{x^2+y^2} + 4 \)

Activity 3.5.18.

Calculate the gradient of this function. Use the countour plots from the activity from Week 8 and draw some of the gradient directions, showing that the gradients are indeed perpendicular to the coutour plots.
\begin{equation*} f(x,y) = \frac{x}{\sin y} \end{equation*}
Solution.
I calculate the two partial derivative.
\begin{gather*} \frac{\del}{\del x} f(x,y) = \frac{1}{\sin y}\\ \frac{\del}{\del y} f(x,y) = \frac{-x \cos y}{\sin^2 y} \end{gather*}
The gradient has these two as components.
\begin{equation*} \nabla f(x,y) = \left( \frac{1}{\sin y}, \frac{-x \cos y}{\sin^2 y} \right) \end{equation*}
I’ve chosen some points and drawn the gradients in Figure 3.5.7
Figure 3.5.7. \(\nabla \frac{x}{\sin y}\)

Activity 3.5.19.

Calculate the gradient of this function. Use the countour plots from the activity from Week 8 and draw some of the gradient directions, showing that the gradients are indeed perpendicular to the coutour plots.
\begin{equation*} f(x,y) = \frac{x^2 + 1}{y^2 - 4} \end{equation*}
Solution.
I calculate the two partial derivative.
\begin{gather*} \frac{\del}{\del x} f(x,y) = \frac{2x + 1}{y^2-4}\\ \frac{\del}{\del y} f(x,y) = \frac{-(x^2+1)(2y)}{(y^2-4)^2} \end{gather*}
The gradient has these two as components.
\begin{equation*} \nabla f(x,y) = \left( \frac{2x + 1}{y^2-4}, \frac{-2y(x^2+1)}{(y^2-4)^2} \right) \end{equation*}
I’ve chosen some points and drawn the gradients in Figure 3.5.8
Figure 3.5.8. \(\nabla \frac{x^2+1}{y^2-4}\)

Subsection 3.5.4 Conceptual Review Questions

  • What is a multivariable function?
  • What is a countour plot?
  • How do multivariable limits differ from single variable limits?
  • What is a partial derivative?
  • What is a gradient?