Notes:
1) Commands always end with - ; or :
2) Use := for assignment - u:= x^2 + y^2;
3) To load the plotting package use - with(plots);
Examples
with(plots):
S:=plot3d(4-x^2-2*y^2,x=-2..2,y=-2..2,style=patchnogrid,color=black,labels=[y, x, z]
):
py1:=implicitplot3d( y=1, x=-3..3,y=-3..3,z=-5..5, style=patchnogrid,color=red,labels=[y,x, z]
):
px1:=implicitplot3d( x=1, x=-3..3,y=-3..3,z=-5..5, style=patchnogrid,color=blue,labels=[y,x, z]
):
display(S,py1,px1);
# Curves of intersection
cy1:=spacecurve([t,1,2-t^2], t=-2..2,color=red,labels=[y,x z]):
cx1:=spacecurve([1,t,3-2*t^2], t=-2..2,color=blue,labels=[y,x, z]):
display(S,cy1,cx1);
# Tangent lines at x=1,y=1
ty1:=spacecurve([1+t, 1,1-2*t], t=-2..2,color=red,labels=[y,x z]):
tx1:=spacecurve([1,1+t,1-4*t],t=-2..2,color=blue,labels=[y,x z]):
display3d(S,cx1,cy1,ty1,tx1);
# Tangent plane at x=1,y=1
tplane:=1-2*(x-1)-4*(y-1):
tpp:=plot3d(tplane, x=-2..2,y=-2..2,labels=[y,x z]):
display(tpp,S);
# Example 2: Tangent plane and normal line
p1:=implicitplot3d( x^2/9+y^2/4+z^2=3, x=-6..6,y=-3.5..3.5,z=-2..2,color=blue,style=patchcontour,labels=[y,x z]):
p2:=implicitplot3d( -2/3*(x+3)-(y+2)-2*(z+1), x=-4..4,y=-4..4,z=-4..4,color=green,style=patchnogrid,labels=[y,x z]):
p3:=spacecurve( [-3-2/3*t,-2-t,-1-2*t],t=-2..2,thickness=3,color=red,labels=[y,x z]):
display(p1,p2,p3);