Calculus 3
Project 2 - Contour Plots
Describing Functions in the Third Dimension
April 15, 2019
Saul Sanchez Diaz de Leon
Saul Sanchez Austin Community College Calculus 3
Contour Plots
−4𝑥
Exercise: Create contour plots for 𝑧 = cos(𝑥) sin(𝑦) and 𝑧 = Print these contour
𝒙𝟐 +𝒚𝟐 +𝟏
plots and then for each one, click on the contour plot to see the contours as they appear on the
surface. For each function, find a viewpoint that shows the surface and contours clearly and
print this Function 1 and graphing it. Then select the Draw Contour Plot option from the
Contour Plot menu. A dialog will appear. Be sure that Function 1 is selected on the left. For the
first function, you will then enter -1 for the First Step, 0.2 for the Step Size and 11 for the
Number of Contours. Then click on the OK button to see the contour plot appear. If you click on
the contour plot, you will see the 3D surface plot of the function will be graphed along with the
contours on the surface. For the second function, you will do the same thing, except you can
enter -2 for the First Step, and 21 for the Number of Steps
−4𝑥
𝑧 = cos(𝑥) sin(𝑦) And 𝑧 =
𝒙𝟐 +𝒚𝟐 +𝟏
For each contour plot, give several reasons why the functions 𝑧(𝑥, 𝑦) are shaped the way they
are and their relation to the contour plots.
Page 1 of 18
Saul Sanchez Austin Community College Calculus 3
1. First, for the function 𝑧 = cos(𝑥) sin(𝑦) we set up the boundaries
𝐷: {(𝑥, 𝑦, 𝑧)| − 2𝜋 ≤ 𝑥 ≤ 2𝜋, −2𝜋 ≤ 𝑦 ≤ 2𝜋, −1 ≤ 𝑧 ≤ 1} to better visualize the
function’s behavior. Plotting the function, we get the following graph (figure 1).
Figure 1
Now, creating the contour plot by following the previous instructions and
parameters, gives us the following graph (figure 2).
Figure 2
Page 2 of 18
Saul Sanchez Austin Community College Calculus 3
We can now combine both graphs from figure 1 and figure 2 to show how they
relate each other, and to give us a more clear way to describe its shape,
behavior, and other characteristics (figure 3).
Figure 3
To describe the function 𝑧 = cos(𝑥) 𝑠𝑖𝑛(𝑦) we can evaluate it from both
functions that multiply it (cos(𝑥) andsin(𝑦)) separately, and see how they affect
the possible values that 𝑧(𝑥, 𝑦) can yield.
a. We know that the function cos(𝑥) yields values−1 ≤ cos(𝑥) ≤ 1, where 𝑥 ∈ ℕ
(is any real number), and we know that the function sin(𝑥) also yields
values−1 ≤ sin(𝑦) ≤ 1, where 𝑦 ∈ ℕ (is any real number)
Therefore, the range is−𝟏 ≤ 𝒛 ≤ 𝟏 s, since it is bounded by the
𝐜𝐨𝐬(𝒙) 𝒔𝒊𝒏(𝒚) constraint. (1)
Page 3 of 18
Saul Sanchez Austin Community College Calculus 3
b. We can also describe the function by finding at what values𝑧(𝑥, 𝑦) = 0, and if
we can find a pattern from our answers and the contour plot from figure 2 and
figure 3.
𝜋 3𝜋 𝑛𝜋
We know that cos(𝑥) = 0 when 𝑥 = , , …, where 𝑛 ∈ ℤ (is any integer)
2 2 2
The function𝑧 = cos(𝑥) sin(𝑦) = 0 every timecos(𝑥) = 0
Therefore, we have lines of the values 𝒛(𝒙, 𝒚) = 𝟎 orthogonal to the
𝒏𝝅
y-axis every 𝟐 , where 𝒏 ∈ ℤ (is any integer) (2)
In addition, we know that sin(𝑦) = 0 when 𝑦 = 0, 𝜋, 2𝜋, …, 𝑛𝜋 where 𝑛 ∈ ℤ (is
any integer)
Thus, the function 𝑧 = cos(𝑥) sin(𝑦) = 0 every timesin(𝑦) = 0
Therefore, we have lines of the values 𝒛(𝒙, 𝒚) = 𝟎 orthogonal to the
x-axis every𝒏𝝅, where 𝒏 ∈ ℤ (is any integer) (3)
The previous lines where 𝑧(𝑥, 𝑦) = 0 or lines of “inflection” can be seen in the
contour plots from figure 2 and in figure 3, where the function is between
negative and positive values. This can be seen in the contour line values from
figure 1 and more intuitively in figure 3.
c. We can also describe the function by finding its minimums and maximums.
So since we know the range of the function is−1 ≤ 𝑧 ≤ 1 the lowest and
highest values that the function can be −1 and 1 so the minimums and
maximums occur when 𝑧 = cos(𝑥) sin(𝑦) = 0 yields those values.
Page 4 of 18
Saul Sanchez Austin Community College Calculus 3
Since the product of both cos(𝑥) and 𝑠𝑖𝑛(𝑦) has to be equal to 1 or−1, the
possible combinations depend whether the values of the functions multiplied are
both positive, both negative, or combined.
So, we get the following possibilities;
Possibilities for Minimums or Maximums
Min. or Max. 𝒄𝒐𝒔(𝒙) = 𝐬𝐢𝐧(𝒚) =
Minimum −1 1
Minimum 1 −1
Maximum 1 1
Maximum −1 −1
The function cos(𝑥) = 1 only happens when𝑥 = 2𝑛𝜋, where 𝑛 ∈ ℤ (is any
integer), and cos(𝑥) = −1 only happens when𝑦 = 2𝑛𝜋 + 𝜋, where 𝑛 ∈ ℤ (is
any integer)
𝜋
In the other hand, the function sin(𝑦) = 1 only happens when𝑦 = + 2𝑛𝜋,
2
3𝜋
where 𝑛 ∈ ℤ (is any integer), and sin(𝑦) = −1 only happens when𝑦 = +
2
2𝑛𝜋, where 𝑛 ∈ ℤ (is any integer)
𝒙 = 𝟐𝒏𝝅
Thus, minimums can only happen when 𝒛(𝒙, 𝒚) = −𝟏 → { 𝟑𝝅
𝒚= 𝟐
+ 𝟐𝒏𝝅
𝒙 = 𝟐𝒏𝝅 + 𝝅
Or 𝒛(𝒙, 𝒚) = −𝟏 → {𝒚 = 𝝅 + 𝟐𝒏𝝅
𝟐
Page 5 of 18
Saul Sanchez Austin Community College Calculus 3
𝒙 = 𝟐𝒏𝝅
And, the maximums can only happen when 𝒛(𝒙, 𝒚) = 𝟏 → {𝒚 = 𝝅 + 𝟐𝒏𝝅
𝟐
𝒙 = 𝟐𝒏𝝅 + 𝝅
Or 𝒛(𝒙, 𝒚) = 𝟏 → { 𝟑𝝅
𝒚= 𝟐
+ 𝟐𝒏𝝅
Where 𝒏 ∈ ℤ (is any integer) (4)
The following is visual proof of the validity of our previous solution from both
contour plots figure 2 and figure 3
𝜋 𝜋 3𝜋
Minimums occurring at the(𝑥, 𝑦) points;(𝜋, 2 ) , (0, − 2 ) , (−𝜋, − 2 )
Figure 4
Page 6 of 18
Saul Sanchez Austin Community College Calculus 3
𝜋 3𝜋 𝜋
Maximums occurring at the (𝑥, 𝑦) points; (0, 2 ) , (𝜋, 2 ) , (−𝜋, − 2 )
Figure 5
Page 7 of 18
Saul Sanchez Austin Community College Calculus 3
−4𝑥
2. Now, for our second function 𝑧 = we set its boundaries and plot its graph,
𝒙𝟐 +𝒚𝟐 +𝟏
and contour plots as we did for the first one. Using the boundaries 𝐷: {(𝑥, 𝑦, 𝑧)| − 9 ≤
𝑥 ≤ 9, −9 ≤ 𝑦 ≤ 9, −3 ≤ 𝑧 ≤ 3} we get the following graph (figure 6)
Figure 6
Now, creating the contour plot by following the first page of instructions and previous
parameters, gives us the following graph (figure 7).
Figure 7
Page 8 of 18
Saul Sanchez Austin Community College Calculus 3
We can now combine both graphs from figure 6 and figure 7 to show how they relate
each other, and to give us a more clear way to describe its shape, behavior, and other
characteristics (figure 8).
Figure 8
−4𝑥
To describe the function 𝑧 = we can evaluate it using the second derivative
𝒙𝟐 +𝒚𝟐 +𝟏
test and evaluate the values (points) that the function yields from its critical values,
and comparing them with the graph. We can also evaluate its limits, and utilize
techniques of evaluating the graph’s behavior when x or y are a constant and
compare its behavior with the previous figures.
a. We can evaluate the function by finding its critical values.
To find the critical values (minimums and maximums) we find the partial
derivatives of the function with respect to x and y.
Page 9 of 18
Saul Sanchez Austin Community College Calculus 3
𝛿 −4𝑥 (𝑥 2 +𝑦 2 +1)(−4)−(−4𝑥)(2𝑥)
So, 𝑧𝑥 = ( ) → 𝑧𝑥 =
𝛿𝑥 𝑥 2 +𝑦 2 +1 (𝑥 2 +𝑦 2 +1)2
4𝑥 2 −4𝑦 2 −4
𝑧𝑥 = (𝑥 2 Now, we set it equal to 0 to find the critical points.
+𝑦 2 +1)2
4𝑥 2 −4𝑦 2 −4
𝑧𝑥 = (𝑥 2 =0 (Equation 1)
+𝑦 2 +1)2
𝛿 −4𝑥 𝛿
Next, 𝑧𝑦 = (
𝛿𝑦 𝑥 2 +𝑦 2 +1
) → 𝑧𝑦 = 𝛿𝑦 [−4𝑥(𝑥 2 + 𝑦 2 + 1)−1 ]
8𝑥𝑦
𝑧𝑦 = (𝑥 2 Now, we set it equal to 0 to find the critical points.
+𝑦 2 +1)2
8𝑥𝑦
𝑧𝑦 = (𝑥 2 =0 (Equation 2)
+𝑦 2 +1)2
Our goal is to find the points where both partials of the function equal 0.
We discard the denominator since it is the same in both of our partial
derivatives.
So, we solve for x from the numerator of equation 1;
4𝑥 2 − 4𝑦 2 − 4 = 0 → 𝑥 2 − 𝑦 2 − 1 = 0
𝑥2 = 𝑦2 + 1
𝑥 = ±√𝑦 2 + 1 (Equation 3)
Substitute the value into numerator of equation 2;
8𝑥𝑦 = 0 → 8𝑦(±√𝑦 2 + 1) = 0
Therefore, 𝑦 = 0
Now, we plug in 𝑦 = 0 to equation 3 to get the value/s of x;
𝑥 = ±√𝑦 2 + 1 → 𝑥 = ±√02 + 1
Page 10 of 18
Saul Sanchez Austin Community College Calculus 3
So, 𝑥 = ±1
Thus, our critical points(𝒙, 𝒚) are (−𝟏, 𝟎)𝒂𝒏𝒅(𝟏, 𝟎) (1)
b. We can use the previously found critical points and evaluate whether they are
min, max, or saddle.
We use the second partial derivative test 𝐷 = 𝐴𝐵 − 𝐶 2 where𝐴 =
𝑓𝑥𝑥 (𝑥, 𝑦), 𝐵 = 𝑓𝑦𝑦 (𝑥, 𝑦), 𝑎𝑛𝑑𝐶 = 𝑓𝑦𝑥 (𝑥, 𝑦). A critical point evaluated using this
method can be classified using the following criteria;
If 𝐷 = 𝐴𝐵 − 𝐶 2 > 0 then the (𝑥, 𝑦) point is either a maximum or a minimum.
If 𝐴𝐵 − 𝐶 2 > 0 and 𝑓𝑥𝑥 > 0 then the point (𝑥, 𝑦) is a local minimum
If 𝐴𝐵 − 𝐶 2 > 0 and 𝑓𝑥𝑥 < 0 then the point (𝑥, 𝑦) is a local maximum
If 𝐷 = 𝐴𝐵 − 𝐶 2 < 0 then the (𝑥, 𝑦) point is a saddle.
First, we need to find the second partial derivatives of
𝐴 = 𝑓𝑥𝑥 (𝑥, 𝑦), 𝐵 = 𝑓𝑦𝑦 (𝑥, 𝑦), 𝑎𝑛𝑑𝐶 = 𝑓𝑦𝑥 (𝑥, 𝑦)
We can use the previous partial derivatives (equation 1, and equation 2) to save
us time.
4𝑥 2 −4𝑦 2 −4 8𝑥𝑦
So, we have; 𝑧𝑥 = and 𝑧𝑦 =
(𝑥 2 +𝑦 2 +1)2 (𝑥 2 +𝑦 2 +1)2
𝛿 4𝑥2 −4𝑦2 −4
𝑓𝑥𝑥 (𝑥, 𝑦) = 𝛿𝑥 [ 2]
(𝑥2 +𝑦2 +1)
We can set it as a product of two functions to simplify the derivative.
Page 11 of 18
Saul Sanchez Austin Community College Calculus 3
𝛿
𝑓𝑥𝑥 (𝑥, 𝑦) = 𝛿𝑥 [(4𝑥 2 − 4𝑦 2 − 4)(𝑥 2 + 𝑦 2 + 1)−2 ]
𝑓𝑥𝑥 (𝑥, 𝑦) = (𝑥 2 + 𝑦 2 + 1)−2 (8𝑥) + (4𝑥 2 − 4𝑦 2 + 1)(−2)(𝑥 2 + 𝑦 2 +
1)−3 (2𝑥)
8𝑥 4𝑥(4𝑥 2 −4𝑦 2 −4)
𝑓𝑥𝑥 (𝑥, 𝑦) = (𝑥 2 − We can further simplify it.
+𝑦 2 +1) 2 (𝑥 2 +𝑦 2 +1)3
(8𝑥)(𝑥 2 +𝑦 2 +1)−(4𝑥)(4𝑥 2 −4𝑦 2 −4)
𝑓𝑥𝑥 (𝑥, 𝑦) = (𝑥 2 +𝑦 2 +1)3
(Equation 4)
𝛿 8𝑥𝑦
Now, 𝑓𝑦𝑦 (𝑥, 𝑦) = 𝛿𝑦 [ 2 ]
(𝑥2 +𝑦2 +1)
We set it as a product of two functions to simplify the derivative.
𝛿
𝑓𝑦𝑦 (𝑥, 𝑦) = 𝛿𝑦 [(8𝑥𝑦)(𝑥 2 + 𝑦 2 + 1)−2 ]
𝑓𝑦𝑦 (𝑥, 𝑦) = (8𝑥)(𝑥 2 + 𝑦 2 + 1)−2 + (8𝑥𝑦)(−2)(𝑥 2 + 𝑦 2 + 1)−3 (2𝑦)
8𝑥 32𝑥𝑦 2
𝑓𝑦𝑦 (𝑥, 𝑦) = (𝑥 2 − (𝑥 2 We can further simplify it.
+𝑦 2 +1) 2 +𝑦 2 +1)3
8𝑥(𝑥 2 +𝑦 2 +1)−32𝑥𝑦 2
𝑓𝑦𝑦 (𝑥, 𝑦) = (𝑥 2 +𝑦 2 +1)3
(Equation 5)
𝛿 8𝑥𝑦
Finally, 𝑓𝑦𝑥 (𝑥, 𝑦) = 𝛿𝑥 [ 2]
(𝑥2 +𝑦2 +1)
We set it as a product of two functions to simplify the derivative.
𝛿
𝑓𝑦𝑥 (𝑥, 𝑦) = 𝛿𝑥 [(8𝑥𝑦)(𝑥 2 + 𝑦 2 + 1)−2 ]
Page 12 of 18
Saul Sanchez Austin Community College Calculus 3
𝑓𝑦𝑥 (𝑥, 𝑦) = (8𝑦)(𝑥 2 + 𝑦 2 + 1)−2 + (8𝑥𝑦)(−2)(𝑥 2 + 𝑦 2 + 1)−3 (2𝑥)
8𝑦 32𝑥 2 𝑦
𝑓𝑦𝑥 (𝑥, 𝑦) = (𝑥 2 − (𝑥 2 We can further simplify it.
+𝑦 2 +1) 2 +𝑦 2 +1)3
8𝑦(𝑥 2 +𝑦 2 +1)−32𝑥 2 𝑦
𝑓𝑦𝑥 (𝑥, 𝑦) = (𝑥 2 +𝑦 2 +1)3
(Equation 6)
We can now evaluate each of the critical points (𝑥, 𝑦) = (−1,0)and(1,0) with
the double partial derivative technique.
2
𝐷(𝑥, 𝑦) = 𝑓𝑥𝑥 (𝑥, 𝑦) ∗ 𝑓𝑦𝑦 (𝑥, 𝑦) − (𝑓𝑦𝑥 (𝑥, 𝑦))
We can evaluate the first critical point (−1,0)
2
𝐷(−1,0) = 𝑓𝑥𝑥 (−1,0) ∗ 𝑓𝑦𝑦 (−1,0) − (𝑓𝑦𝑥 (−1,0))
(8(−1))((−1)2 +(0)2 +1)−(4(−1))(4(−1)2 −4(0)2 −4)
𝑓𝑥𝑥 (−1,0) =
((−1)2 +(0)2 +1)3
−8(2)+4(4−4) 16
𝑓𝑥𝑥 (−1,0) = → 𝑓𝑥𝑥 (−1,0) = −
23 8
𝑓𝑥𝑥 (−1,0) = −2
8(−1)((−1)2 +(0)2 +1)−32(−1)(0)2
𝑓𝑦𝑦 (−1,0) =
((−1)2 +(0)2 +1)3
−8(2)+32(0) 16
𝑓𝑦𝑦 (−1,0) = → 𝑓𝑦𝑦 (−1,0) = −
23 8
𝑓𝑦𝑦 (−1,0) = −2
Page 13 of 18
Saul Sanchez Austin Community College Calculus 3
8(0)((−1)2 +(0)2 +1)−32(−1)2 (0)
𝑓𝑦𝑥 (−1,0) =
((1)2 +(0)2 +1)3
16(0)−32(0)
𝑓𝑦𝑦 (−1,0) = 23
𝑓𝑦𝑦 (−1,0) = 0
Thus, 𝐷(−1,0) = (−2)(−2) − (0)2 = 4 > 0
And 𝑓𝑥𝑥 (−1,0) = −2 < 0
Therefore, the point (−𝟏, 𝟎) is a maximum (2)
Now let’s evaluate the second critical point (1,0)
2
𝐷(1,0) = 𝑓𝑥𝑥 (1,0) ∗ 𝑓𝑦𝑦 (1,0) − (𝑓𝑦𝑥 (1,0))
(8(1))((1)2 +(0)2 +1)−(4(1))(4(1)2 −4(0)2 −4)
𝑓𝑥𝑥 (1,0) =
((1)2 +(0)2 +1)3
8(2)+4(4−4) 16
𝑓𝑥𝑥 (−1,0) = → 𝑓𝑥𝑥 (1,0) =
23 8
𝑓𝑥𝑥 (−1,0) = 2
8(1)((1)2 +(0)2 +1)−32(1)(0)2
𝑓𝑦𝑦 (1,0) =
((1)2 +(0)2 +1)3
−8(2)−32(0) 16
𝑓𝑦𝑦 (−1,0) = → 𝑓𝑦𝑦 (1,0) =
23 8
𝑓𝑦𝑦 (−1,0) = 2
8(0)((1)2 +(0)2 +1)−32(1)2 (0)
𝑓𝑦𝑥 (−1,0) =
((1)2 +(0)2 +1)3
Page 14 of 18
Saul Sanchez Austin Community College Calculus 3
16(0)−32(0)
𝑓𝑦𝑦 (1,0) = 23
𝑓𝑦𝑦 (1,0) = 0
Thus, 𝐷(1,0) = (2)(2) − (0)2 = 4 > 0
And 𝑓𝑥𝑥 (1,0) = 2 > 0
Therefore, the point (𝟏, 𝟎) is a minimum (3)
We can try plotting the points and proving graphically that we are correct.
The following figure (figure 9) has the point (−1,0)
Figure 9
We can see how the point is among the positive contour lines, and in the point
of steepest value.
Page 15 of 18
Saul Sanchez Austin Community College Calculus 3
Now, we can plot the other critical point (1,0) and evaluate its placement within
the contour plot below (figure 10).
Figure 10
For a more visually intuitive proof, we can use the graph with the contour plot
and the 3D graph to show both points in the graph.
Figure 11
Page 16 of 18
Saul Sanchez Austin Community College Calculus 3
c. We can also describe the function by finding its limits when letting either x or y
be an arbitrary constant, and compare the functions to the graph’s behavior.
First let 𝑦 = 𝑘 where𝑘 ∈ ℕ (is an arbitrary constant), so our equation becomes;
−4𝑥
𝑧=
𝒙𝟐 + 𝒌𝟐 + 𝟏
Since we only have one variable (k became a constant) our function can be
evaluated as a regular function with a single independent variable;
Our new equation is a quotient of two equations, with the denominator having a
higher degree than its numerator.
Thus, the function has an asymptote at 𝒛 = 𝟎 along all the x-axis
We can prove this by looking at the following graph of the zx-plane (figure 12).
Figure 12
We can see that as the function approaches infinity from either side it gets closer
−4𝑥
to the x-axis, thus lim ( )=0
𝑥→∞ 𝒙𝟐 +𝒌𝟐 +𝟏
Page 17 of 18
Saul Sanchez Austin Community College Calculus 3
d. Now, using the previous technique, we let 𝑥 = 𝑘 where 𝑘 ∈ ℕ (is any arbitrary
constant) and evaluate the function.
−4𝑘
Our equations now becomes. 𝑧 =
𝒌𝟐 +𝒚𝟐 +𝟏
𝑘
The equation becomes 𝑧 = (where k is an arbitrary constant)
𝑦 2 +𝑘
Thus, the equation has an asymptote at 𝒛 = 𝟎 along the y-axis
This asymptotic behavior can be seen in the following graph of the zy-plane
(figure 13).
Figure 13
We can see that as the function approaches infinity from either side it gets closer
𝑘
to the y-axis, thus lim ( )=0
𝑦→∞ 𝒚𝟐 +𝒌
Page 18 of 18