Chapter 9: Vector Calculus
Section 9.3: Differential Operators
Example 9.3.4
Integrate the gradient field for the scalar function f x , 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 f x , 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 g x , 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 , x 0 = a , y 0 = b
•
The solution of this system can be put into the form x = u e t + v e − t , y = u e t − v e − t . To obtain g x , y , the parameter t must be eliminated, and therein typically lies an algebraic challenge. Here, it is possible to obtain g x , y = y 2 − x 2 , with the level curves g x , y = constant being hyperbolas. The hyperbola through a , b is y 2 − x 2 = b 2 − a 2 .
•
Since dy dx = y . x . = x y , a separable differential equation of the form y dy = x dx , a solution for g x , y = y 2 − x 2 = 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: Cartesian bipolar cardioid cassinian elliptic hyperbolic invcassinian logarithmic logcosh parabolic polar rose tangent 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 , x 0 = a , y 0 = b → solve DE x t = − 1 2 b + 1 2 a ⅇ − t + 1 2 b + 1 2 a ⅇ t , y t = − − 1 2 b + 1 2 a ⅇ − t + 1 2 b + 1 2 a ⅇ t
•
Control-drag the solution, and edit x t to just x , and y t to just y .
•
Context Panel: Solve≻Eliminate a Variable≻ t
x = − 1 2 b + 1 2 a ⅇ − t + 1 2 b + 1 2 a ⅇ t , y = − − 1 2 b + 1 2 a ⅇ − t + 1 2 b + 1 2 a ⅇ t → eliminate t t = ln y + a 2 − b 2 + y 2 a + b , 2 a 2 − 2 b 2 + 2 y 2 − 2 a 2 − b 2 + y 2 x + 2 y a 2 − b 2 + y 2 − 2 x y , t = ln − − y + a 2 − b 2 + y 2 a + b , − 2 a 2 − b 2 + y 2 x + 2 y a 2 − b 2 + y 2 − 2 a 2 + 2 b 2 + 2 x y − 2 y 2
•
Control-drag one of the equations containing x and y , and set it equal to zero.
•
Context Panel: Solve≻Solve for Variable≻ y
2 a 2 − 2 b 2 + 2 y 2 − 2 a 2 − b 2 + y 2 x + 2 y a 2 − b 2 + y 2 − 2 x y = 0 → solve for y y = − a 2 + b 2 + x 2 , y = − − a 2 + b 2 + x 2
Table 9.3.4(a) Integrating the gradient field by solving R . = ∇ f
Squaring both sides of either solution results in g x , y ≡ y 2 − x 2 = b 2 − a 2 .
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 DE y x = x 2 + _C1 , y x = − x 2 + _C1
Table 9.3.4(b) Context Panel solution of y ′ = x / y
Of course, squaring both sides of either solution leads to y 2 − x 2 = c , where, for the solution to pass through a , b , it must be that c = b 2 − a 2 .
Alternatively, if the Context Panel is launched on y ′ = x / y , y a = 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 y 2 − x 2 = b 2 − a 2 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 , y a = b . Note the inclusion of the implicit option.
dsolve diff y x , x = x / y x , y a = b , y x , implicit
− x 2 + y x 2 + a 2 − b 2 = 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 x t and y t 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 y 2 − x 2 = constant .
q ≔ dsolve diff x t , t = y t , diff y t , t = x t , x t , y t
x t = _C1 ⅇ − t + _C2 ⅇ t , y t = − _C1 ⅇ − t + _C2 ⅇ t
X ≔ eval x t , q
_C1 ⅇ − t + _C2 ⅇ t
Y ≔ eval y t , q
− _C1 ⅇ − t + _C2 ⅇ t
Q ≔ eliminate x = X , y = Y , t
t = ln 1 2 y + 4 _C1 _C2 + y 2 _C2 , − x 4 _C1 _C2 + y 2 + y 4 _C1 _C2 + y 2 + 4 _C2 _C1 − x y + y 2 , t = ln − 1 2 − y + 4 _C1 _C2 + y 2 _C2 , − x 4 _C1 _C2 + y 2 + y 4 _C1 _C2 + y 2 − 4 _C2 _C1 + x y − y 2
S ≔ op 2 , Q 1 1
− x 4 _C1 _C2 + y 2 + y 4 _C1 _C2 + y 2 + 4 _C2 _C1 − x y + y 2
solve S , y
y = − 4 _C1 _C2 + x 2 , y = − − 4 _C1 _C2 + x 2
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