Sie sind auf Seite 1von 3

Lab 6: Plot3D and ContourPlot

◼ Instructions

The purpose of this assignment is to assess your knowledge of the relationship between the plot of a func-
tion of two variables and its contour plot. Please refer to the “Plot3D and ContourPlot.nb” file if you have
problems with any of the questions. Some things to remember as you complete this assignment:
1. Save the notebook to your computer right away, and save your work often.
2. When you have finished all the exercises, close any unnecessary cells and save as a PDF. (Make sure
you Rasterize all 3-dimensional plots)
3. Upload the PDF on Canvas.
4. Do not delete this notebook. Save all your work until after the semester is over and your final grade has
been issued.

◼ Question 1. Defining a function of two variables

Define a function of two variables to be -1 * (2 sin(y * π / 4) + 3 cos(x * π / 4)). Use your first name to be the
name of the function. Don’t forget to properly format your trig functions.

In[11]:= Clear[z, x, y]
π π
chelsey[x_, y_] = - 1 * 2 * Siny *  + 3 * Cosx *  ;
2 4

◼ Question 2. Contour Plot

a) Plot the contour plot for the function in question 1. Use x and y values that go from -5 to 5.

Printed by Wolfram Mathematica Student Edition


2 Lab6ChelseySpitzner.nb

In[13]:= ContourPlot[chelsey[x, y], {x, - 5, 5}, {y, - 5, 5}]

Out[13]=
0

-2

-4

-4 -2 0 2 4

b) The point on the graph corresponding to (0, -2) is best described as which of the following:
i. bottom of a bowl ii. hilltop iii. saddle iv. side of a hill
Create a text cell right below this cell, and type your answer.

Side of a hill

c) If a ball were dropped at the point on the graph corresponding to (0, 0), which best describes the direction
the ball will roll:
i. the positive y direction ii. the positive x direction iii. the negative y direction iv. the negative x
direction
Create a text cell right below this cell, and type your answer.

The positive y direction

◼ Question 3. Plot3D

a) Use the Plot3D command to plot the function from Question 1. Use the same range of x and y values as
in Question 2 a). Note that you should be able to use this plot to confirm your answers to Question 2. You
may use AxesLabel command to indicate the three labels. Don’t forget to use the Rasterize command on
this plot before saving this notebook as a pdf.

Printed by Wolfram Mathematica Student Edition


Lab6ChelseySpitzner.nb 3

In[55]:= Rasterize[Plot3D[chelsey[x, y], {x, - 5, 5}, {y, - 5, 5}, AxesLabel → {"x", "y", "z"}]]

Out[55]=

b) Give one approximate value of (x, y) which corresponds to the highest point on the graph, just use your
eyeball to find the answer, x and y should both belong to [-5, 5].

(4.5,-2)

c) Is the answer from part b unique?

No.

Printed by Wolfram Mathematica Student Edition

Das könnte Ihnen auch gefallen