Chapter 9: Vector Calculus
Section 9.3: Differential Operators
Example 9.3.4
Integrate the gradient field for the scalar function fx,y=x y.
Solution
Mathematical Solution
Figure 9.3.4(a) is a graphical representation of the integration of a gradient field. The gradient field for fx,y=x y is y i+x j, and these vectors are represented by the red arrows in the figure.
Integrating the field means finding a function gx,y whose level curves are everywhere tangent to the arrows of the field. Several such level curves are shown as the black curves in Figure 9.3.4(a).
The arrows in the figure are drawn on a regular grid; hence, not all the arrows fall directly on an integral curve (or flow line) of the field.
module() local inits, p; inits := [[0, -5, 4], [0, -4, 5], [0, -5, 4.5], [0, -4.5, 5], [0, 4.5, -5], [0, 4, -5], [0, 5, -4], [0, 5, -4.5]]; p:=DEtools:-DEplot({diff(x(t), t) = y(t), diff(y(t), t) = x(t)}, {x(t), y(t)}, t = -3 .. 3, x = -5 .. 5, y = -5 .. 5, inits, linecolor = black, arrows = medium, dirgrid = [10, 10]); print(p); end module:
Figure 9.3.4(a) Integration of a gradient field
The function g is found as the solution of either a coupled set of differential equations, or a single equation. If t is the parameter along one of the level curves, and the overdot represents differentiation with respect to t, then the level curve through the point a,b is a solution of the system
x.=y,y.=x,x0=a,y0=b
The solution of this system can be put into the form x=u et+v e−t, y=u et−v e−t. To obtain gx,y, the parameter t must be eliminated, and therein typically lies an algebraic challenge. Here, it is possible to obtain gx,y=y2−x2, with the level curves gx,y=constant being hyperbolas. The hyperbola through a,b is y2−x2=b2−a2.
Since dydx=y.x.=xy, a separable differential equation of the form y dy=x dx, a solution for gx,y=y2−x2=constant is immediate.
Maple Solution - Interactive
The best interactive tool for integrating a gradient field graphically is the task template shown in Figure 9.3.4(b). Bounds for the graph are established by entering values under the Plot Window heading. The components of the vector field are entered under the Vector Field heading. The coordinate system and coordinate-variable names are next given under the Coordinates heading. The name and range for the parameter along the integral curves are specified under the Path Parameter heading. Pressing the Enter Data button initializes the graph, which then displays arrows of the vector field. Click on the vector field, and the coordinates of the point clicked on will appear in the window at the bottom of the task template. The integral curve through that point will appear on the graph. In Figure 9.3.4(b), eight integral curves were so obtained, and the result resembles the graph in Figure 9.3.4(a).
Tools≻Tasks≻Browse: Calculus - Vector≻Vector Fields≻Integrate Planar Vector Field
Integrate Planar Vector Field
Plot Window
≤x≤, ≤y≤
Vector Field
Component 1:
Component 2:
Coordinates
System: Cartesianbipolarcardioidcassinianelliptichyperbolicinvcassinianlogarithmiclogcoshparabolicpolarrosetangent Variables:
Path Parameter
≤≤
Figure 9.3.4(b) Graphical integration of a vector field
Table 9.3.4(a) contains an interactive solution of the system of differential equations whose solutions are curves along which the gradient field is tangent.
Context Panel: Solve DE System
x.=y,y.=x, x0=a,y0=b→solve DEx⁡t=−12⁢b+12⁢a⁢ⅇ−t+12⁢b+12⁢a⁢ⅇt,y⁡t=−−12⁢b+12⁢a⁢ⅇ−t+12⁢b+12⁢a⁢ⅇt
Control-drag the solution, and edit xt to just x, and yt to just y.
Context Panel: Solve≻Eliminate a Variable≻t
x=−12⁢b+12⁢a⁢ⅇ−t+12⁢b+12⁢a⁢ⅇt,y=−−12⁢b+12⁢a⁢ⅇ−t+12⁢b+12⁢a⁢ⅇt→eliminate tt=ln⁡y+a2−b2+y2a+b,2⁢a2−2⁢b2+2⁢y2−2⁢a2−b2+y2⁢x+2⁢y⁢a2−b2+y2−2⁢x⁢y,t=ln⁡−−y+a2−b2+y2a+b,−2⁢a2−b2+y2⁢x+2⁢y⁢a2−b2+y2−2⁢a2+2⁢b2+2⁢x⁢y−2⁢y2
Control-drag one of the equations containing x and y, and set it equal to zero.
Context Panel: Solve≻Solve for Variable≻y
2⁢a2−2⁢b2+2⁢y2−2⁢a2−b2+y2⁢x+2⁢y⁢a2−b2+y2−2 x y=0→solve for yy=−a2+b2+x2,y=−−a2+b2+x2
Table 9.3.4(a) Integrating the gradient field by solving R.= ∇f
Squaring both sides of either solution results in gx,y≡y2−x2=b2−a2.
An interactive solution of y′=x/y, the alternate differential equation, is obtained in Table 9.3.4(b).
Context Panel: Solve DE
y′=x/y→solve DEy⁡x=x2+_C1,y⁡x=−x2+_C1
Table 9.3.4(b) Context Panel solution of y′=x/y
Of course, squaring both sides of either solution leads to y2−x2=c, where, for the solution to pass through a,b, it must be that c=b2−a2.
Alternatively, if the Context Panel is launched on y′=x/y,ya=b, and the option Solve DE Interactively is selected, then the Assistant is launched, as shown in Figure 9.3.4(c). Pressing the Solve Symbolically button opens the second pane, whose upper half is shown in Figure 9.3.4(d). On the left, in the section labeled "Method", set the "Explicit" field to "no" so that Maple does not automatically try to provide an explicit solution. Hence, the implicit solution shown in the figure is returned when the Solve button under "Output" is pressed.
Figure 9.3.4(c) ODE Analyzer Assistant - 1
Figure 9.3.4(d) ODE Analyzer Assistant - 2
With slight re-arrangement, the solution y2−x2=b2−a2 has again been obtained.
Maple Solution - Coded
Invoking the dsolve command as per Table 9.3.4(c) returns the solution of the initial-value problem y′=x/y,ya=b. Note the inclusion of the implicit option.
dsolvediffyx,x=x/yx,ya=b,yx,implicit
−x2+y⁡x2+a2−b2=0
Table 9.3.4(c) Solution via the dsolve command
Table 9.3.4(d) contains the much more tedious solution of the coupled equations x.=y,y.=x. The equations are solved with the dsolve command, but xt and yt must be extracted separately with the eval command. The eliminate command is used to eliminate the parameter t, and the op command is used to select one of the two possible solutions. Finally, the solve command is applied to isolate y, from which it is again possible to obtain y2−x2=constant.
q≔dsolvediffxt,t=yt,diffyt,t=xt,xt,yt
x⁡t=_C1⁢ⅇ−t+_C2⁢ⅇt,y⁡t=−_C1⁢ⅇ−t+_C2⁢ⅇt
X≔evalxt,q
_C1⁢ⅇ−t+_C2⁢ⅇt
Y≔evalyt,q
−_C1⁢ⅇ−t+_C2⁢ⅇt
Q≔eliminatex=X,y=Y,t
t=ln⁡12⁢y+4⁢_C1⁢_C2+y2_C2,−x⁢4⁢_C1⁢_C2+y2+y⁢4⁢_C1⁢_C2+y2+4⁢_C2⁢_C1−x⁢y+y2,t=ln⁡−12⁢−y+4⁢_C1⁢_C2+y2_C2,−x⁢4⁢_C1⁢_C2+y2+y⁢4⁢_C1⁢_C2+y2−4⁢_C2⁢_C1+x⁢y−y2
S≔op2, Q11
−x⁢4⁢_C1⁢_C2+y2+y⁢4⁢_C1⁢_C2+y2+4⁢_C2⁢_C1−x⁢y+y2
solveS,y
y=−4⁢_C1⁢_C2+x2,y=−−4⁢_C1⁢_C2+x2
Table 9.3.4(d) Solution of coupled system via the dsolve command
<< Previous Example Section 9.3 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
Download Help Document