Homework, 14.7: #4, 20, 48, pp. 978--
MAT329, Fall 2015
Andy Long

#4

f[x_,y_]:=3x-x^3-2y^2+y^4
Plot3D[f[x,y],{x,-2,2},{y,-2,2}]
ContourPlot[f[x,y],{x,-2,2},{y,-2,2},Contours->{-2.9, -2.7,-2.5,-2,-1.5,-1,0,.5,1,1.5,1.7,1.9}]
fx[x_,y_]=D[f[x,y],x]
fy[x_,y_]=D[f[x,y],y]
fxx[x_,y_]=D[f[x,y],x,x]
fxy[x_,y_]=D[f[x,y],x,y]
fyy[x_,y_]=D[f[x,y],y,y]

Disc[x_,y_]:=fxx[x,y]*fyy[x,y]-fxy[x,y]^2
Disc[-1,1]
fxx[-1,1]
Disc[1,0]
fxx[1,0]
Disc[1,1]
fxx[1,1]

#20: 2plug-n-chug4me? I just need to do a copy and paste, once I’ve done programmed it up properly.

f[x_,y_]:=x^2y E^(-(x^2+y^2))
width=-3
Plot3D[f[x,y],{x,-width,width},{y,-width,width},Mesh->20,PlotRange->All]
fx[x_,y_]=D[f[x,y],x];
fy[x_,y_]=D[f[x,y],y];
fxx[x_,y_]=D[f[x,y],x,x];
fxy[x_,y_]=D[f[x,y],x,y];
fyy[x_,y_]=D[f[x,y],y,y];

Simplify[fx[x,y]]
Simplify[fy[x,y]]
Simplify[fxx[x,y]]
Simplify[fxy[x,y]]
Simplify[fyy[x,y]]

Disc[1,1/Sqrt[2]]
fxx[1,1/Sqrt[2]]
Disc[1,-1/Sqrt[2]]
fxx[1,-1/Sqrt[2]]

#43: 2plug-n-chug4me -- so use your powers of Mathematica and creativity to make it relatively easy and elegant!

Clear[l,w,h]
volume[l_,w_,h_]:=l w h
area[l_,w_,h_]:=2(l w + w h + h l)
root=Solve[area[l,w,h]==64,h]
h=Replace[h,root[[1]][[1]]]
root=Solve[D[volume[l,w,h],l]==0 && D[volume[l,w,h],w]==0,{l,w}]
{l,w}={Replace[l,root[[2]][[1]]],Replace[l,root[[2]][[2]]]}
h