Introduction
This worksheet gives two examples of Maple's capabilities for calculating and displaying the
streamlines in a 2-dimensional vector field.
Example 1
A vector field v is defined by: v x, y = vxi Cvyj . The streamlines show the path traced by an object
following the vector field and can be plotted by defining the first order ordinary differential equation:
dy vy
= . In this example, a vector field v is defined by v x, y = x Cy i C x Ky j
dx vx
v x Ky x
y x =
vx x Cy x
d x Ky x
y x =
dx x Cy x
dsolve (2.1), y x
Kx _C1 K 2 x2 _C12 C1 Kx _C1 C 2 x2 _C12 C1
y x = ,y x = (2.2)
_C1 _C1
As explicit solutions:
The family of solutions is now plotted in the first quadrant to display the sections of streamlines for
various values of _C1:
0
0 2 4 6 8 10
x
with plots :
fieldplot x Cy, xKy , x = 0 ..10, y = 0 ..10, arrows = slim ;
10
0
0 2 4 6 8 10
x
Comparing these two plots, the solutions of the original differential equation indicate the direction of
the vector field at any point but to see the magnitude and direction of the field, the fieldplot
procedure must be used.
Example 2
Kx Kx
Repeat the above analysis for the vector field: v = e $cos x i Ke $sin x j . The differential
equation defining the streamlines is:
v
y x =Ktan x
vx
d
y x = Ktan x (3.1)
dx
whose general solution is:
dsolve (3.1)
y x = ln cos x C_C1 (3.2)
exp2 d solve (3.2), y x
ln cos x C_C1 (3.3)
0
0 2 4 6 8 10
x
with plots :
fieldplot Kcos x , sin x , x = 0 ..10, y = 0 ..6, arrows = SLIM ;
6
y 3
0 2 4 6 8 10
x
Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to
demonstrate the use of Maple to solve a particular problem. It has been made available for product
evaluation purposes only and may not be used in any other context without the express permission of
Maplesoft.