Mathematica:  Project 2

1) Plot the level curves and the graphs of the given functions.
	a)	  f(x,y)=x (y^5)-(x^5)y for -10≤x≤10, -10≤y≤10
	b)	  f(x,y)=(((x^2)+2y)/(1+(x^2)+(y^2))) for -10≤x≤10, -10≤y≤10

Plot3D[x*y^5-x^5*y,{x,-10,10},{y,-10,10}]

Plot3D[(x^2+2y)/(1+x^2+y^2),{x,-10,10},{y,-10,10}]

2)	 Use least two nondefault options to plot the given functions.
	a)	 f(x,y)=sin (x-2y)(e^(1/(y-x))) for  -2π≤x≤2π, -2π≤y≤2π
	b)	 f(x,y)=4-3|x|-2|y| for -10≤x≤10, -10≤y≤10

Plot3D[Sin[x-2y]*E^1/(y-x),{x,-2Pi,2Pi},{y,-2Pi,2Pi}]

Plot3D[4-3*Abs[x]-2*Abs[y],{x,-10,10},{y,-10,10}]

3)	 Plot the portion of the helicoid (spiral ramp) that is defined by:
		x = u cos v,  y = u sin v, z = v for 0 ≤ u ≤ 3  and  -2π ≤ v ≤2 π

ParametricPlot3D[{u*Cos[v],u*Sin[v],v},{u,0,3},{v,-2Pi,2Pi}]

4)	Find the limit, if it exists.
	a)	 (lim_((x,y)->(1,-1)))(2(x^2)y +x (y^2))		b)	 (lim_((x,y)->(1,1)))((3(x^2)+(y^2))/((x^2)-y))

Limit[2x^2*y+x*y^2,{x,y}->{1,-1}]

Limit[(3x^2+y^2)/(x^2-y),{x,y}->{1,1}]

5)	 Let f(x,y)=((((x-y))^2)/((x^2)+(y^2))).  Find:  
		a)	 (Subscript[f, x]) (1,0)	b)	 (Subscript[f, y])(1,0)	c)	 (Subscript[f, xy])		d)	 (Subscript[f, yx])		e)	 (Subscript[f, xxy])

f[x_,y_]:=(x-y)^2/(x^2+y^2)
fx:=D[f[x,y],x]
fy:=D[f[x,y],y]
D[f[x,y],x,y]
D[f[x,y],y,x]
D[f[x,y],{x,2},y]

6)	 Find the four second partial derivatives of f(x,y)=(x^2)cos(y) +tan(x (e^y)).

f[x_,y_]:=x^2*Cos[y]+Tan[x*E^y]
D[f[x,y],{x,2}]
D[f[x,y],x,y]
D[f[x,y],y,x]
D[f[x,y],{y,2}]

7) 	Let f(x,y,z)=(((x^4)(y^3))/((z^2)+sin x)).  Find (Subscript[f, xxx]), (Subscript[f, xyz]), (Subscript[f, xzz]), (Subscript[f, zxz ]), and (Subscript[f, zzx]).

f[x_,y_,z_]:=(x^4*y^3)/(z^2+Sin[x])
D[f[x,y,z],{x,3}]
D[f[x,y,z],x,y,z]
D[f[x,y,z],x,{z,2}]
D[f[x,y,z],z,x,z]
D[f[x,y,z],{z,2},x]

8)	 Let  f(x,y)=(x^(3 ))y +x (y^2)-3x +4.
		a) 	Find the equation of the tangent plane to the surface at the point (1, 2).
		b) 	Graph the surface and the tangent plane found in a).

f[x_,y_]:=x^3*y+x*y^2-3*x+4
D[f[x,y],x]
D[f[x,y],y]
f[1,2]

7
fx[x_,y_]:=-3+3 (x^2) y+(y^2)
fy[x_,y_]:=(x^3)+2 x y
fx[1,2]
fy[1,2]

z[x_,y_]:=7+7(x-1)+5(y-2)

9)	 Find the gradient and directional derivative of  f(x,y,z) =  x y (e^( y z))+ sin (x z) at the point (1,1,0)  in the direction of v=i-j-k.

f[x_,y_,z_]:=x*y*E^(y*z)+Sin[x*z]
delF[x_,y_,z_]:={D[f[x,y,z],x], D[f[x,y,z],y], D[f[x,y,z],z]}
direcDeriv[a_,b_,c_] :=Dot[delF[x,y,z],{a,b,c}/Sqrt[x^2+y^2+z^2]]
direcDeriv[1,1,0]

10) 	Let f(x,y)=(x^4)-4 x y+2(y^2). 
		a. 	Find all critical points of f.
		b. 	Use the second derivative test to classify the critical points as local minimum, local maximum, saddle point, or neither.
		c. 	Plot the graph of f and the local extreme points and saddle points, if any.

f[x_,y_]:=x^4-4x*y+2*y^2
fx:=D[f[x,y],x]
fy:=D[f[x,y],y]
Solve[fx==0]
Solve[fy==0]
fxx:=D[fx,x]
fyy:=D[fy,y]
fxy:=D[fx,y]
discrim = fxx*fyy-fxy^2
Plot3D[f[x,y],{x,-2,2},{y,-2,2}]