z := x^2 - sin(x*y); f := unapply(z,x,y): dx := x-1: dy := y-Pi/2: fx := subs({x=1,y=Pi/2}, diff(z,x)): fy := subs({x=1,y=Pi/2}, diff(z,y)): Z := f(1,Pi/2) + fx*dx + fy*dy; plot3d({z,Z}, x=-3..3, y=-3..3, grid=[50,50], axes=framed, title=`z=x^2 - sin(xy) with Tangent Plane at x=1, y=Pi/2`); Tplane := proc(z,a,b) local fx,fy,dx,dy,z0,Z; z0 := subs({x=a,y=b},z); dx := x-a; dy := y-b; fx := subs({x=a,y=b},diff(z,x)); fy := subs({x=a,y=b},diff(z,y)); Z := simplify( z0 + fx*dx + fy*dy); Z := collect(Z,[x,y]); Z := sort(Z,[x,y]); end; Z1 := Tplane(z,1,Pi/2); Z := Tplane(sqrt(1-x^2-y^2),1/2,1/2); solve(x*y^2*z^3 = 12,z); z := solve(x*y^2*z^3 = 12,z)[1]; Z3 := Tplane(z,3,2); plot3d({z,Z3},x=0.1..5,y=0.5..5,grid=[50,50]);