DirectionalDerivativesAndAviation::usage=" Let the pressure P and temperature T at a point {x, y, z} be P[x, y, z] = +2, T[x, y, z] = 5 + x y - .a If the position of an airplane at time t is {x[t], y[t], z[t]} = {2t, - 1, Cos[t]} find (PT at time t = 0 as observed from the airplane.b) In which direction should a bird at the point {0, -1, 1} fly if it wants to keep both P and T constant. (Give one possible direction vector. It does not need to be a unit vector.)c An ant crawls on the surface + x z + = 2 . When the ant is at the point {0, -1, 1}, in which direction should it go for maximum increase of the temperature T = 5 + x y - ? Your answer should be a vector {a, b, c}, not necessarily of unit length. (Note that the ant cannot crawl in the direction of the gradient because that leads off the surface. The direction vector {a, b, c} has to be on the tangent plane to the surface.)References: Internet: personal.math.ubc.ca, 2.7.2 Directional Derivatives And The Gradient, Exercise Stage 2, Prob.-21; Personal.";
2
x
2
y
1+
2
z
2
z
2
t
t
2
)
3
z
2
y
2
z
a) Find attimet=0asobservedfromtheairplane:
t
2
(PT)
In[]:=
P[t_]:=;T[t_]:=5+2t(-1)-;
4+2
2
t
2
(-1)
2
t
1+
2
Cos[t]
2
t
2
Cos[t]
In[]:=
g[t_]=D[];
2
(P[t]T[t])
In[]:=
g[0]
Out[]=
16
The sign - 16, it perhaps refers to the fact that is observed from the plane.
b) In which direction should a bird at the point {0, -1, 1} fly if it wants to keep both P and T constant (debe ser perpendicular a ambas):
In[]:=
P[x_,y_,z_]:=+2;T[x_,y_,z_]:=5+xy-;
2
x
2
y
1+
2
z
2
z
In[]:=
g[x_,y_,z_]=Grad[P[x,y,z],{x,y,z}];h[x_,y_,z_]=Grad[T[x,y,z],{x,y,z}];
In[]:=
n=g[0,-1,1];n1=h[0,-1,1];
In[]:=
v=nn1
±{4,1,-2}
c) In which direction should it go for maximum increase of the temperature:
In[]:=
S[x_,y_,z_]:=+xz+-2;g1[x_,y_,z_]=Grad[S[x,y,z],{x,y,z}];n2=g1[0,-1,1];
3
z
2
y
Projection of the gradient of T over the gradient of S:
In[]:=
n2.n1
2
(Norm[n2])
Out[]=
-,1,-
1
2
3
2
Then the optimal direction is:
d=∇T{0,-1,1}--,1,-;
1
2
3
2
In[]:=
d=n1--,1,-
1
2
3
2
-,-1,-=-{1,2,1}=-{1,2,1}
1
2
1
2
1
2
Explanatory figure:
Tangent plane to the surface
In[]:=
n2.{x,y+1,z-1}
In[]:=
Simplify[x-2(1+y)+3(-1+z)]
-5+x-2y+3z=0;
In[]:=
ShowContourPlot3D[+xz+==2,{x,-2,2},{y,-2,2},{z,-2,2},ContourStyle->Directive[Green,Opacity[0.2],Specularity[White,30]],MeshNone],ContourPlot3D[-5+x-2y+3z==0,{x,-2,2},{y,-2,2},{z,-2,2},ContourStyle->Directive[Purple,Opacity[0.2],Specularity[White,30]],MeshNone],Graphics3D[{Black,Ball[{0,-1,1},0.05],Arrowheads[.03],Arrow[Tube[{{0,-1,1},{0,-1,1}+0.45{-1,0,-2}}]]}],Graphics3D[{Yellow,Point[{0,-1,1}],Arrowheads[.03],Arrow[Tube[{{0,-1,1},{0,-1,1}+0.5{1,-2,3}}]]}],Graphics3DOrange,Point[{0,-1,1}],Arrowheads[.03],ArrowTube{0,-1,1},{0,-1,1}+0.5-,1,-,Graphics3D[{Green,Point[{0,-1,1}],Arrowheads[.03],Arrow[Tube[{{0,-1,1},{0,-1,1}-0.25{1,2,1}}]]}],AxesLabel->(Style[#,15,Blue]&/@{"X","Y","Z"}),AxesOrigin{0,0,0},AxesTrue,BoxedFalse,BoxRatiosAutomatic,PlotRangeAll,ImageSizeFull
3
z
2
y
1
2
3
2
Out[]=