Chapter 4: Partial Differentiation
Section 4.5: Gradient Vector
If u=x4+2⁢x2⁢y2+y4−1x2+y2+2⁢y+1⁢x2+y2−2⁢y+1 and v=4⁢x⁢yx2+y2+2⁢y+1⁢x2+y2−2⁢y+1, show both graphically and analytically that their level curves are mutually orthogonal.
Figure 4.5.10(a) shows the level curves of u in black, and the level curves of v 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 established if ∇u·∇v=0, which would show 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.
However, in this example the gradient vectors are large expressions in x and y, as seen in the calculation below.
use plots in
Figure 4.5.10(a) Level curves of u and v
∇u·∇v = 4⁢x⁢x4−2⁢x2⁢y2−3⁢y4+2⁢x2+2⁢y2+1x2+y2+2⁢y+12⁢x2+y2−2⁢y+124⁢y⁢3⁢x4+2⁢x2⁢y2−y4+2⁢x2+2⁢y2−1x2+y2+2⁢y+12⁢x2+y2−2⁢y+12·−4⁢y⁢3⁢x4+2⁢x2⁢y2−y4+2⁢x2+2⁢y2−1x2+y2+2⁢y+12⁢x2+y2−2⁢y+124⁢x⁢x4−2⁢x2⁢y2−3⁢y4+2⁢x2+2⁢y2+1x2+y2+2⁢y+12⁢x2+y2−2⁢y+12=0
Maple Solution - Interactive
Tools≻Load Package: Student Multivariate Calculus
Control-drag expression for u.
Context Panel: Student Multivariate Calculus≻Differentiate≻Gradient
Context Panel: Simplify≻Simplify
Context Panel: Assign to a Name≻Gu
x4+2⁢x2⁢y2+y4−1x2+y2+2⁢y+1⁢x2+y2−2⁢y+1→gradient4⁢x3+4⁢x⁢y2x2+y2+2⁢y+1⁢x2+y2−2⁢y+1−2⁢x4+2⁢x2⁢y2+y4−1⁢xx2+y2+2⁢y+12⁢x2+y2−2⁢y+1−2⁢x4+2⁢x2⁢y2+y4−1⁢xx2+y2+2⁢y+1⁢x2+y2−2⁢y+124⁢x2⁢y+4⁢y3x2+y2+2⁢y+1⁢x2+y2−2⁢y+1−x4+2⁢x2⁢y2+y4−1⁢2⁢y+2x2+y2+2⁢y+12⁢x2+y2−2⁢y+1−x4+2⁢x2⁢y2+y4−1⁢2⁢y−2x2+y2+2⁢y+1⁢x2+y2−2⁢y+12= simplify 4⁢−3⁢y4+−2⁢x2+2⁢y2+x2+12⁢xx2+y2+2⁢y+12⁢x2+y2−2⁢y+12−4⁢y5+8⁢x2+8⁢y3+12⁢x4+8⁢x2−4⁢yx2+y2+2⁢y+12⁢x2+y2−2⁢y+12→assign to a nameGu
Control-drag expression for v.
Context Panel: Assign to a Name≻Gv
4⁢x⁢yx2+y2+2⁢y+1⁢x2+y2−2⁢y+1→gradient4⁢yx2+y2+2⁢y+1⁢x2+y2−2⁢y+1−8⁢x2⁢yx2+y2+2⁢y+12⁢x2+y2−2⁢y+1−8⁢x2⁢yx2+y2+2⁢y+1⁢x2+y2−2⁢y+124⁢xx2+y2+2⁢y+1⁢x2+y2−2⁢y+1−4⁢x⁢y⁢2⁢y+2x2+y2+2⁢y+12⁢x2+y2−2⁢y+1−4⁢x⁢y⁢2⁢y−2x2+y2+2⁢y+1⁢x2+y2−2⁢y+12= simplify 4⁢y5+−8⁢x2−8⁢y3+−12⁢x4−8⁢x2+4⁢yx2+y2+2⁢y+12⁢x2+y2−2⁢y+124⁢−3⁢y4+−2⁢x2+2⁢y2+x2+12⁢xx2+y2+2⁢y+12⁢x2+y2−2⁢y+12→assign to a nameGv
Common Symbols palette: Dot product operator
Context Panel: Evaluate and Display Inline
Gu·Gv = 4⁢−3⁢y4+−2⁢x2+2⁢y2+x2+12⁢x⁢4⁢y5+−8⁢x2−8⁢y3+−12⁢x4−8⁢x2+4⁢yx2+y2+2⁢y+14⁢x2+y2−2⁢y+14+4⁢−4⁢y5+8⁢x2+8⁢y3+12⁢x4+8⁢x2−4⁢y⁢−3⁢y4+−2⁢x2+2⁢y2+x2+12⁢xx2+y2+2⁢y+14⁢x2+y2−2⁢y+14= simplify 0
to generate Figure 4.5.10(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.10(a).
The Interactive Plot Builder can be used to draw Figure 4.5.10(a), but the figure so generated cannot be saved to the document. It can only be Previewed.
Figure 4.5.10(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 Plot Builder as per Figure 4.5.10(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 −4,−3,−2,−1,1,2,3,4.
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.10(c).
Figure 4.5.10(b) Interactive Plot Builder: 2-D contour plot
Figure 4.5.10(c) Options pane in Interactive Plot Builder
Maple Solution - Coded
Install the Student MultivariateCalculus package.
Use the Gradient and DotProduct commands.
simplifyDotProductGradientu,x,y,Gradientv,x,y = 0
Obtain Figure 4.5.10(a)
The contourplot and display commands from the plots package will produce Figure 4.5.10(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., 2023. 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
Download Help Document