Chapter 4: Partial Differentiation
Section 4.5: Gradient Vector
|
Example 4.5.9
|
|
Show both graphically and analytically that the level curves of are orthogonal to the level curves of .
|
|
|
|
Solution
|
|
|
Mathematical Solution
|
|
•
|
Figure 4.5.9(a) shows the level curves of in black, and the level curves of in red. From the figure, it appears that these sets of level curves intersect at right angles.
|
•
|
Analytically, the orthogonality of these sets of level curves is shown by the computation
|
which shows that the respective gradient vectors are orthogonal. Since these gradient vectors are themselves orthogonal to vectors tangent to the level curves, the sets of level curves are then orthogonal to each other.
|
>
|
use plots in
module()
local u,v,p1,p2,p3,k;
u:=sin(x)*cosh(y);
v:=cos(x)*sinh(y);
p1:=contourplot(u,x=-Pi..Pi,y=-4..4,color=black,contours=[seq(k,k=-5..5)],grid=[150,150]);
p2:=contourplot(v,x=-Pi..Pi,y=-4..4,color=red,contours=[seq(k,k=-5..5)]);
p3:=display(p1,p2,scaling=constrained);
print(p3);
end module:
end use:
|
|
Figure 4.5.9(a) Level curves of and
|
|
|
|
|
|
|
|
Maple Solution - Interactive
|
|
Initialize
|
•
|
Tools≻Load Package: Student Multivariate Calculus
|
|
Loading Student:-MultivariateCalculus
|
•
|
Control-drag expressions for each of u and v.
|
•
|
Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient
|
•
|
Context Panel: Assign to a Name≻Gu or Gv, as appropriate
|
|
|
|
Show
|
•
|
Common Symbols palette: Dot product operator
|
•
|
Context Panel: Evaluate and Display Inline
|
|
=
|
Use the
to generate Figure 4.5.9(a)
At the present time, the Plot Builder in the Context Panel does not allow for specifying exactly which contours are to be drawn. Therefore, it will not reproduce Figure 4.5.9(a).
The Interactive Plot Builder can be used to draw Figure 4.5.9(a), but the figure so generated cannot be saved to the document. It can only be Previewed.
Figure 4.5.9(a) is best drawn with the code hidden behind the graph in the Mathematical Solution, or by the code in the Coded Solution.
|
•
|
Set the main panel of the Interactive Plot Builder as per Figure 4.5.9(b).
|
•
|
In the Options panel, select a function (topmost drop-down box) to set its color and to change the default list of contours to .
|
•
|
Select "Global Defaults & Settings" in the topmost drop-down box, and check "Constrained Scaling" (lower-left in the "View" section of the Options panel). See Figure 4.5.9(c).
|
|
|
Figure 4.5.9(b) Interactive Plot Builder: 2-D contour plot
|
|
|
|
|
Figure 4.5.9(c) Options pane in Interactive Plot Builder
|
|
|
|
|
|
|
|
Maple Solution - Coded
|
|
Initialize
|
•
|
Install the Student MultivariateCalculus package.
|
|
Loading Student:-MultivariateCalculus
|
|
|
Show
|
|
=
|
Obtain Figure 4.5.9(a)
|
•
|
The contourplot and display commands from the plots package will produce Figure 4.5.9(a), as illustrated by the following code. Simply remove the colon from the last line and execute.
|
|
|
|
|
|
|
|
<< Previous Example 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
|