Tangent Planes Illustrated

Purpose:  This notebook provides a simple example of how to illustrate tangent planes to surfaces of the form z = f(x,y).
Developer:  Lt Col Steve Hadfield, US Air Force Academy, CO; modified by Andy Long, NKU, Fall, 2015
File Name:  14.4.hw.nb

Define the function and the tangent plane

The cell below is used to define the function for the surface (z=f(x,y)) and then the tangent plane to the surface at the point (xp, yp).

Clear[f,x,y, fx,fy,xp,yp];
xp=1;
yp=1;
f[x_,y_]= x^2+ x y + 3y^2;
fx[x_,y_]=D[f[x,y],x];
fy[x_,y_]=D[f[x,y],y];
T[x_,y_]:=f[xp,yp]+fx[xp,yp](x-xp)+fy[xp,yp](y-yp)
T[x,y]

The next cell plots the surface function and the tangent plane and then shows them on the same plot.

Clear[a,b];
Manipulate[
a=Plot3D[f[x,y],{x,xp-c,xp+c},{y,yp-c,yp+c}];
b=Plot3D[T[x,y],{x,xp-c,xp+c},{y,yp-c,yp+c}];
Show[a,b,ViewPoint->{3.130, 0.970, 0.845},AspectRatio->1,AxesLabel->{"x","y","f(x,y)"}]
, {{c,2,"scale"},0.01,2}
]

(* #22: Here's a linear approximator, based on centered approximations at (40,20): *)
T[v_,t_]:=28+(40-17)/20*(v-40)+(31-25)/15*(t-20)
T[40,20]
N[T[43,24]]

(* #36: The Wind-chill index: *)
W[T_,v_]:=13.12+0.6215 T - 11.37 v^(0.16) + 0.3965 T v^(0.16)

dWdT[T_,v_]=D[W[T,v],T]
dWdv[T_,v_]=D[W[T,v],v]
dT=1;
dv=-2;
dWdT[-11,26]
dWdv[-11,26]
dW=dWdT[-11,26]*dT+dWdv[-11,26]*dv

dT=-1;
dv=2;
dW=dWdT[-11,26]*dT+dWdv[-11,26]*dv