Math 225: Calculus III    Solution 5

Initialization

<<Calculus`Math225`

Needs["Graphics`ContourPlot3D`"]

i = {1, 0, 0}; j = {0, 1, 0}; k = {0, 0, 1};

Problem 1

Let
    w[x_,y_] = Tan[x^2 + y^2]
and
    x[r_,s_] = E^(-r) + E^s; y[r_,s_] = r/s

Find the derivatives of w with respect to r and s when r == 2 and s == 1.
(The dependencies between the variables must be made explicit: use
D[w[x[r,s],y[r,s]],r], and  D[w[x[r,s],y[r,s]],s]) .

Solution

w[x_,y_] = Tan[x^2 + y^2]

x[r_,s_] = E^(-r) + E^s

y[r_,s_] = r/s

D[w[x[r,s],y[r,s]],r]

% /. {r->1, s->2}

N[%]

D[w[x[r,s],y[r,s]],s]

% /. {r->2, s->1}

N[%]

Problem 2

Let f[x_,y_] = x^3 y - x^2 y^2 - y^4.
a) Find the gradient of f[x,y],  Grad[f[x,y],{x,y}].
b) Find the direction in which f[x_,y_] increases most rapidly at the point {1,2} and find the derivative of f[x,y] in that direction.
c) Plot the level curve of f[x,y] through the point {1,2}.

Solution

f[x_,y_] = x^3 y - x^2 y^2 - y^4

a)

Grad[f[x,y],{x,y}]

b) The  direction in which f[x_,y_] increases most rapidly at the point {1,2} is given by the gradient and find the derivative in that direction by the norm of the gradient.

Grad[f[x,y],{x,y}] /. {x->1, y->2}

Norm[%]

N[%]

c) The level curve through {1,2} is given by f[x,y] == f[1,2].

f[1,2]

ContourPlot[f[x,y], {x,-1,3}, {y,1,3},
Contours->{-18}, ContourShading->False]

Problem 3

Let f[x_,y_,z_] = y^3 + z^2 - x^2. 
a) Plot the level surface f[x,y,z] == 1
b) Find Grad[f[x,y,z]] at the point {1,1,1} and plot this vector with the level surface from part a). ({1,1,1} is on this level surface).

Solution

Clear[f, x, y, z];

f[x_,y_,z_] = y^3 + z^2 - x^2

a)

cp= ContourPlot3D[f[x,y,z],{x,-2,4},{y,-2,4},{z,-2,4},
    Contours->{1}]

b)

Grad[f[x,y,z]]

v = Grad[f[x,y,z]] /. {x->1, y->1, z->1}

w = Vector[{1,1,1}, {1,1,1} + v]

Show[cp, w, ViewPoint->{2.165, 1.845, 1.833}]

Problem 4

a) Find the equation for the plane tangent to the level surface z - x^2 + y^2 == 1 at the point {3,2,6}.
b) Graph the surface together with this tangent plane. (Suggestion: choose a domain for the tangent plane smaller than the domain for the surface so that the point of tangency is easy to see.)

Solution

a) The normal vector of the tangent plane is given by the gradient of z - x^2 + y^2 at {3,2,6}.

n = Grad[z - x^2 + y^2] /. {x->3, y->2, z->6}

The equation of the tangent plane is then

n.{x,y,z} == n.{3,2,6}

b)

tp = Plot3D[-4+6x-4y, {x,2,4}, {y,1,3}]

s = Plot3D[1+x^2-y^2, {x,1,5}, {y,0,4}]

Show[s, tp, ViewPoint->{-2.464, -1.786, 1.479}]

Problem 5

Let f[x_,y_] = 3 x y  - x^3 - y^2
a) Test the function f[x,y] for local maxima, local minima, and saddle points.
b) Find the value of f[x,y] at the points found in a).
c) Produce a graph of f[x,y]that includes the points found in a).

Solution

a) First find critical points.

f[x_,y_] = 3 x y  - x^3 - y^2

cp = CriticalPoints[f[x,y]]

Now the second derivative test.

d = Discriminant[f[x,y]]

d /. cp

The point {0,0} is a saddle point. The point {3/2,9/4} is either a local max or min. Test D[f[x,y],x,x] to find out.

D[f[x,y],x,x] /. {x->3/2, y->9/4}

This means there is a local max at {3/2,9/4}.

b)

f[x,y] /. cp

c)

Plot3D[f[x,y], {x,-0.5,2.5}, {y,-0.5,4},
BoxRatios->{1,1,2},
ViewPoint->{2.539, -1.868, 1.231}]