Chapter 4: Partial Differentiation
Section 4.5: Gradient Vector
|
Example 4.5.1
|
|
Let and let P be the point .
c)
|
On the same set of axes, graph the level curve through P, and at P.
|
d)
|
At P, show that is orthogonal to a vector tangent to the level curve through P.
|
e)
|
At P, obtain , the directional derivative of in the direction . Show that is a maximum when u is along and that this maximum is .
|
|
|
|
|
Solution
|
|
|
Mathematical Solution
|
|
For Part (a), = .
The graphs for Parts (b) and (c) are given in Figures 4.5.1(a) and 4.5.1(b), respectively.
|
Figure 4.5.1(a) The surface
|
|
|
|
>
|
use plots, Student:-VectorCalculus in
module()
local f,p1,p2,p3,V;
f:=5-2*x^2-3*y^2;
V:=RootedVector(root=[1,2],<-4,-12>);
p1:=contourplot(f,x=-5..5,y=-10..3,color=black,contours=[-3,-6,-9,-12,-15,-18,-30,-40,-50]);
p2:=PlotVector(V,color=red);
p3:=display(p1,p2,scaling=constrained);
print(p3);
end module:
end use:
|
|
Figure 4.5.1(b) Level curves & gradient vector
|
|
|
|
|
|
For Part (d), solve for , giving an explicit representation of the level curve through P. Then, writing this curve as
its tangent vector at P is , from which it follows that
In Part (e), the maximum of is at radians (about ) measured from the positive -axis.
Figure 4.5.1(c) is a graph of , from which the maximum can be approximated.
Figure 4.5.1(d) is an animation showing as the transparent red arrow, and as the rotating black arrow. The value of appears above the -axis, and the corresponding value of is written in the fourth quadrant. The maximum value of is attained when is aligned with . This maximum value is .
|
Figure 4.5.1(c) Graph of
|
|
|
|
>
|
use Student:-VectorCalculus,plots in
module()
local p1,p2,V,F;
V:=RootedVector(root=[1,2],<-4,-12>);
p1:=PlotVector(V,width=.3,color=red,transparency=.5);
F:=proc(t)
local g1,g2,U;
U:=RootedVector(root=[1,2],<cos(t),sin(t)>);
g1:=PlotVector(U,color=black,unconstrainedview=false);
g2:=textplot([1,-5,convert(evalf(-4*(cos(t)+3*sin(t)),5),string)]);
display(g1,g2);
end proc;
p2:=animate(F,[t],t=0..2*Pi,frames=63,background=p1,paraminfo=true,scaling=constrained);
print(p2);
end module:
end use:
|
|
Figure 4.5.1(d) and u
|
|
|
|
|
|
|
|
Maple Solution - Interactive
|
|
Initialize
|
•
|
Tools≻Load Package:
Student Multivariate Calculus
|
|
Loading Student:-MultivariateCalculus
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Context Panel: Assign Name
|
|
|
Part (a)
|
•
|
Type the name .
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient
See Figure 4.5.1(e).
|
•
|
Context Panel: Select Element≻1
|
•
|
Context Panel: Assign to a Name≻Gf
|
|
|
Figure 4.5.1(e) Gradient dialog
|
|
|
|
|
|
|
=
|
Part (b) - Generate Figure 4.5.1(a)
|
•
|
From the Context Panel, launch the Plot Builder on the rule for f.
|
•
|
Plots≻Plot Builder≻3-D plot
|
|
=
|
Part (c)
|
•
|
To generate Figure 4.5.1(b) interactively, first obtain a 2D contour map of via the Plot Builder, launched from the Context Panel.
Select "2-D contour plot"
|
•
|
Obtain a graph of via the Context Panel's Plot option, "Arrow from point"
See Figure 4.5.1(f).
|
•
|
Copy/paste the arrow onto the contour map.
|
|
|
Figure 4.5.1(f) Dialog for graphing an arrow
|
|
|
|
|
|
Part (d)
|
•
|
Expression palette: Evaluation template
Form the equation
|
•
|
Context Panel: Solve≻Obtain Solutions for≻
|
•
|
Control-drag to form the equation
|
•
|
Context Panel: Assign Function
|
|
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Common Symbols palette: Dot product operator
|
•
|
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Simplify≻Simplify
|
|
=
|
Part (e)
|
•
|
Common Symbols palette: Dot Product operator
|
•
|
Context Panel: Assign Name
|
|
|
•
|
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Optimization≻Maximize (local)
|
|
=
|
•
|
Write and press the Enter key.
|
•
|
Context Panel:
Differentiate≻With Respect To≻
|
•
|
Context Panel: Conversions≻Equate to 0
|
•
|
Context Panel: Solve≻Solve (general solution)
|
•
|
Expression palette: Evaluation template
Context Panel: Evaluate and Display Inline
|
|
=
|
•
|
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Norm≻Euclidean
|
|
=
|
•
|
Form a sequence of the vectors and i.
|
•
|
Context Panel: Evaluate and Display Inline
|
•
|
Context Panel: Student Multivariate Calculus≻Lines & Planes≻Angle
|
•
|
Context Panel: Assign to a Name≻lambda
|
|
=
|
•
|
Context Panel: Approximate≻5 (digits)
|
|
|
|
|
|
|
Maple Solution - Coded
|
|
Initialize
|
•
|
Install the Student MultivariateCalculus package.
|
|
|
|
|
Part (a)
|
|
|
Part (b)
|
•
|
Figure 4.5.1(a), a graph of the surface , can be drawn with the plot3d command, below.
|
|
|
Part (c)
|
|
|
Part (d)
|
•
|
Use the solve and eval commands to obtain an explicit representation of , the level curve passing through .
|
|
|
•
|
Use the simplify, eval, and diff commands to obtain at , a vector T tangent to the level curve .
|
|
|
|
=
|
|
|
The vanishing of the dot product between the tangent vector and the gradient vector verifies that the gradient vector is orthogonal to the level curve.
Part (e)
|
•
|
Define the unit vector u.
|
|
|
•
|
Use the DirectionalDiff command in the Student VectorCalculus package to obtain .
Although there is a DirectionalDerivative command in the Student MultivariateCalculus package, it accepts only numeric direction vectors, so would fail with the generic unit vector u.
|
|
|
•
|
Obtain Figure 4.5.1(c) with the plot command.
|
|
|
•
|
Maximize by using the solve and diff commands to obtain all solutions of .
|
|
|
•
|
Use the eval command to obtain the maximum value of , namely, .
|
|
=
|
•
|
Apply the Norm command to the gradient vector and evaluate at the point .
|
|
=
|
•
|
Use the eval command to obtain , the direction giving the maximum value of the directional derivative, .
This vector is a positive multiple of .
|
|
=
|
•
|
Obtain the (smaller) angle between and the horizontal vector i by using the simplify and Angle commands. Note that the angle, clockwise from i to , is returned as an arccosine.
|
|
=
|
•
|
Define as the counterclockwise angle from i to .
|
|
|
•
|
Use the evalf command to show that the difference between and is zero.
|
|
=
|
|
|
|
|
|
<< Chapter Overview Section 4.5
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
|