f(x,y)=x^2+y^2when x and y are constrained to lie on the ellipse
(x-1)^2+4*y^2=4.
with(plots):
at the command line.
Then use gradplot to plot the gradient vector field grad f(x,y)
for x=-2..4,y=-2..2. Print out a copy of this plot.
What are the level curves for f? On your printout sketch the level curves of height k for several values of k. Make sure you label the heights for each of the curves.
alpha(t)=((x(t),y(t))for the ellipse
(x-1)^2+4*y^2=4and plot it using the
plot command.
Then use the display command to simultaneously
display the ellipse and grad f.
Think of starting at the point (1,1) on the ellipse and moving a little bit in the clockwise direction around the curve. Based on the direction of grad f at the point (1,1), decide whether f increases or decreases as a result. What if you move counterclockwise? Give reasons for your answers.
Let g(x,y)=(x-1)^2+4*y^2. Then we can think of the ellipse as the level set of height 4 for g. On a printout of your plot from above, sketch grad g at the point (1,1). Is grad g parallel to grad f at this point?
Repeat the above for the point (1,-1).
Repeat the following for each of the points (x,y) you found.
grad f(x,y)=c*(grad g(x,y))for some constant c. (Each such constant c is called a Lagrange multiplier.) Explain why the points you found in the first part of Question 3 are exactly the points that satisfy the Lagrange multiplier equation.