Prof. Vladimir Dobrushkin
Department of Mathematics
TO SYLLABUS
TO GRADING
TO SOFT
TO BOOKS
TO QUIZZES
 

MTH243 (Calculus for Functions of Several Variables)
MATLAB. Chapter 12:
Functions of Several Variables

Vladimir A. Dobrushkin,Lippitt Hall 202C, 874-5095,dobrush@uri.edu

In this course we will use Mathematica computer algebra system (CAS), which is available in computer labs at URI. The Mathematica projects are created to help you learn new concepts. Mathematica is very useful in visualizing graphs and surfaces in three dimensions. Matlab (commercial software) is also available at engineeering labs. Its free version is called Octave. A student can also use free CASs: SymPy (based on Python), Maxima or Sage.

 

Section 12.3. Contour Diagrams

Example 1.

Example 2.

Example 3.

Example 4. Draw a contour diagram for \( f(x,y) = \sqrt{x^2 + y^2} \) and relate it to the graph of f.

First, we plot cones:

figure
[X,Y,Z] = meshgrid(-10:0.5:10,-10:0.5:10,-10:0.5:10);
a=1;
b=1;
c=1;
V = X.^2/a^2 + Y.^2/b^2 - Z.^2/c^2;
p=patch(isosurface(X,Y,Z,V,0)); 
set(p,'FaceColor','GREEN','EdgeColor','none');
daspect([1 1 1])
view(3);
camlight
title('12.77 Cone')
a = 1.5; b = 1.5; c = 1;
ContourPlot3D[ x^2/a^2 + y^2/b^2 - z^2/c^2 == 0, {x, -3, 3}, {y, -3, 3}, {z, -2, 2}, ColorFunction -> Hue]
ContourPlot3D[ x^2 + y^2 - z^2 == 0, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, ContourStyle -> LightGray]
ContourPlot3D[ x^2 + y^2 - z^2 == 0, {x, -4., 4.}, {y, -4., 4.}, {z, -4., 4.}, Axes -> True, BoxRatios -> {1., 1., 1.}, ViewPoint -> {-1.5, -2.5, -0.5}, PlotRange -> All, AxesLabel -> {"x", "y", "z"}, ContourStyle -> Directive[RGBColor[1, 0.8, 0.3], Specularity[RGBColor[0.2, 0.4, 0.9], 20]], Lighting -> "Neutral", ColorFunction -> None, BoxStyle -> GrayLevel[0.4, 0.35]]
ContourPlot3D[ x^2 + y^2 - z^2 == -0, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, Mesh -> 4, MeshFunctions -> {#1 &, #2 &, #3 &}]
ContourPlot3D[ x^2 + y^2 - z^2 == -0, {x, -3, 3}, {y, -3, 3}, {z, -3, 3}, MeshShading -> {Blue, Orange}, MeshFunctions -> {#3 &}]
Plot3D[-Sqrt[x^2 + y^2], {x, -5, 5}, {y, -5, 5}, BoxRatios -> {1, 1, 1}]

Example 5.

Example 6.

Example 7.

Example 8.