Example Exercises

This notebook gives some ideas how to use Mathematica to help solve exercises in Calculus III.

Useful Definitions

Several functions useful to Calculus III have been defined in a special Mathematica package. In order to use these functions, the following statement must be executed first (this will be done automatically when you open this notebook).

Needs["Calculus`Advanced`"]

The examples below should be self explanatory. Consult the notebook `AdvancedCalculusDemo' for more information on how to use these functions.

Exercise

Find an equation for the plane that passes through the point

p = {-1,6,0};

perpendicular to the line

x == -1 + t; y == 6 - 2t; z == 3t;

Solution

The direction of the line is given by the coefficients of t:

n = {1, -2, 3};

The plane is to be perpendicular to the line so we can use the direction of the line as the normal vector to the plane.

n.{x,y,z} == n.p

l = ParametricPlot3D[{-1+t, 6-2t, 3t}, {t, -2, 2},
   ViewPoint->{2,1,1}]

p = Plot3D[ (-13 - x + 2y)/3, {x,-3,1}, {y,2,10}];
Show[Graphics3D[p], ViewPoint->{2,1,1} ]

Show[{l,p}]

Exercise

Match the graph to the level curves.

z = Cos[x] Cos[y] Exp[-Sqrt[x^2 + y^2]/4]

Plot3D[z, {x,-2Pi, 2Pi}, {y,-2Pi, 2Pi}]

ContourPlot[z, {x,-2Pi, 2Pi}, {y,-2Pi, 2Pi}]

Exercise

z = x y E^(- x y)/(x^2 + y^2)

Plot3D[ z, {x,-0.5,0.5}, {y,-0.5,0.5},
    PlotPoints->30]

ContourPlot[ z, {x,-0.5,0.5}, {y,-0.5,0.5}, ContourLevels->15,PlotPoints->30]

Excercise

A flat circular plate has the shape of the region x^2 + y^2 == 1. The plate is heated so that the temperature at the point {x,y} is

T[x_,y_] = x^2 + 2y^2 - x;

Find the temperatures at the hottest and coldest points on the plate.

Solution

ContourPlot[T[x,y], {x,-1,1}, {y,-1,1}]

First find the critical points inside the region.

eqns = {D[T[x,y],x]==0, D[T[x,y],y] == 0}

Solve[eqns]

In one step:

CriticalPoints[T[x,y]]

T[x,y] /. %

Now find the max/min of T[x,y] on the boundary x^2 + y^2 == 1.
Solve for y and plug into T[x,y]:

Solve[x^2 + y^2 == 1, y]

T[x,y] /. %  //Simplify

The temperature function on the boundary has been reduced to a function of x,
-1 <= x <= 1, and it is the same function on the top half as on the bottom half of the circle:

f[x_] = 2 - x - x^2;

Find critical points of f[x] in the interval.

Solve[f'[x] == 0]

Evaluate f[x] at this critical point.

f[-1/2]

Evaluate f[x] at the endpoints.

f[-1]

f[1]

The max of f[x] is 9/4 at x==-1/2, and the min is 0 at x==1.

We can also use the method of Lagrange multipliers to find critical points of T[x,y] on the boundary x^2 + y^2 == 1.

g[x,y] = x^2 + y^2;

Solve[{Grad[T[x,y]]==lambda Grad[g[x,y]],
    g[x,y]==1}]

Or invoke the function Lagrange[]:

Lagrange[T[x,y], x^2 + y^2 == 1]

Evaluate T[x,y] at these points.

T[x,y] /. %

So, the overall maximum of T[x,y] is 9/4 at {-1/2,±Sqrt[3]/2}, and the overall minimum of T[x,y] is -1/4 at {1/2,0}.