2 Systems of Equations: Preliminary Definitions and Theory
Tải bản đầy đủ - 0trang
428
Chapter 6 Systems of Ordinary Differential Equations
2
1
5
10
15
20
25
-1
-2
Figure 6-1 In the limit as t
, the solution is periodic
and the initial-value problem is equivalent to the initial-value problem
y
x
y
1
x0
x2 y
1, y 0
x
1.
We use NDSolve to generate a numerical solution to this initial-value problem
valid for 0 t 25.
In[1091]:= numsol
NDSolve
x t
y t
1
Out[1091]=
y t ,
x t
2
y t
x t ,
x 0
1, y 0
1 , x t , y t , t, 0, 25
x t
InterpolatingFunction
0., 25. , <> t ,
y t
InterpolatingFunction
0., 25. , <> t
We can use this result to approximate the solution for various values of t. For
example, entering
In[1092]:=
Out[1092]=
x t ,y t
/. numsol /. t > 1
1.29848, 0.367035
shows us that x 1
1.29848 and x 1
y1
0.367035. We use Plot to graph
x t and y t (the graph of y t is in gray) in Figure 6-1.
In[1093]:= Plot Evaluate x t , y t /. numsol , t, 0, 25 ,
PlotStyle > GrayLevel 0 , GrayLevel 0.5
6.2 Systems of Equations: Preliminary Deﬁnitions and Theory
3
2
1
-3
-2
-1
1
2
3
-1
-2
-3
Figure 6-2
The solution approaches a limit cycle
Because we let x
y, notice that y t > 0 when x t is increasing and y t < 0
when x t is decreasing. The observation that these solutions are periodic is further conﬁrmed by a graph of x t (the horizontal axis) versus y t (the vertical axis)
generated with ParametricPlot in Figure 6-2. We see that as t increases, the
solution approaches a certain ﬁxed path, called a limit cycle.
In[1094]:= ParametricPlot x t , y t /.numsol, t, 0, 25 ,
PlotRange >
3, 3 , 3, 3 ,
AspectRatio > 1, Compiled > False
We will ﬁnd that nonlinear equations are more easily studied when they are written as a system of equations.
6.2.1 Preliminary Theory
Deﬁnition 24 (System of Ordinary Differential Equations). A system of ordinary
differential equations is a simultaneous set of equations that involves two or more dependent variables that depend on one independent variable. A solution of the system is a set
of functions that satisﬁes each equation on some interval I.
429
430
Chapter 6 Systems of Ordinary Differential Equations
If the differential equations in the system of differential equations are linear equations, we say that the system is a linear system of differential equations or a
linear system.
EXAMPLE 6.2.1: Show that
tion to the system
x
y
y
5x
x
y
1 t
5e
t
e
et
cos 2t
cos 2t
3 sin 2t
sin 2t
is a solu-
0
2y
1.
SOLUTION: The set of functions is a solution to the system of equations because
In[1095]:= Clear x, y, t
x t
1
Exp
5
y t
Exp
In[1096]:= x t
t
t
Exp t
Cos 2t
Cos 2t
Sin 2t
3 Sin 2t
y t //Simplify
Out[1096]= 0
and
In[1097]:= y t
5x t
2y t //Simplify
Out[1097]= 1
We graph this solution in several different ways. First, we graph the
solution
x
xt
parametrically with ParametricPlot in Figure 6-3.
y yt
Then, we graph x t and y t together as functions of t in Figure 6-4.
In[1098]:= ParametricPlot x t , y t , t, 0, 3Π ,
PlotRange
0 . 5, 1 ,
1, 0.5 , AspectRatio 1
Plot x t , y t , t, 0, 3Π ,
PlotStyle
GrayLevel 0 , GrayLevel 0.5
PlotRange
1 , 0. 5
,
1
Notice that limt x t
yt
0. Therefore, in the para5 and limt
metric plot, the points on the curve approach 1/ 5, 0 as t increases.
6.2 Systems of Equations: Preliminary Deﬁnitions and Theory
0.4
0.2
-0.4 -0.2
0.2
0.4
0.6
0.8
1
-0.2
-0.4
-0.6
-0.8
-1
Figure 6-3
x (on the horizontal axis) versus y (on the vertical axis)
0.4
0.2
2
4
6
8
-0.2
-0.4
-0.6
-0.8
-1
Figure 6-4 x (in black) and y (in gray) as functions of t
We will discuss techiques for solving systems in the following sections. For now,
we make the following remarks. First, we saw previously that you can often use
NDSolve to generate a numerical solution of a system, which is of particular beneﬁt with nonlinear systems. DSolve can also often be used to ﬁnd solutions of
linear systems and, in a few special cases, nonlinear systems.
431
432
Chapter 6 Systems of Ordinary Differential Equations
x
EXAMPLE 6.2.2: Solve
y
2y
1
4x
x
and
2y
y
1
4x
x0
2, y 0
1.
SOLUTION: DSolve can ﬁnd a general solution of this linear system.
In[1099]:= gensol
Out[1099]=
x t
y t
DSolve x t
2y t , y t
1/ 4 x t , x t , y t , t
t
C 1 Cos
2 2 C 2 Sin
2
C 2 Cos
t
C 1 Sin
2
2
t
,
2
t
2
2
Similarly, DSolve can solve the initial-value problem. The resulting list
is named partsol.
In[1100]:= partsol
Out[1100]=
x t
y t
x t
2y t ,
1/ 4 x t , x 0
2,
1 , x t ,y t ,t
t
t
2 Cos
2 Sin
,
2
2
t
t
1
2 Cos
2 Sin
2
2
2
DSolve
y t
y 0
We use Plot to graph the x and y components of the solution individually and ParametricPlot to graph them parametrically. See
Figure 6-5.
In[1101]:= p1
p2
Plot x t , y t /.partsol,
t, 0, 4 Sqrt 2 Π ,
PlotStyle
GrayLevel 0 ,
GrayLevel 0.3 ,
AxesLabel
"t", "x, y" ,
DisplayFunction Identity
ParametricPlot x t , y t /.partsol,
t, 0, 2 Sqrt 2 Π , AxesLabel
"x", "y" ,
AspectRatio Automatic,
DisplayFunction Identity
Show GraphicsArray
p1, p2
6.2 Systems of Equations: Preliminary Deﬁnitions and Theory
433
x,y
y
1
0.5
-3 -2 -0.5
-1
-1
3
2
1
-1
-2
-3
2.5 5 7.51012.51517.5t
(a)
Figure 6-5
1
2
3
x
(b)
(a) Plots of x (in black) and y (in gray). (b) Parametric plot of x versus y
y
3
2
1
-6
-4
-2
2
4
6
x
-1
-2
-3
Figure 6-6 Direction ﬁeld associated with the system together with the solution to the
initial-value problem
For an autonomous system like this, we use PlotVectorField
to graph the direction ﬁeld associated with the system.
PlotVectorField is contained in the PlotField package that is located
in the Graphics folder (or directory). After loading the PlotField package,
In[1102]:= << Graphics‘PlotField‘
we use PlotVectorField to graph the direction ﬁeld associated with
the system and then display the direction ﬁeld together with the solution to the initial-value problem in Figure 6-6.
In[1103]:= pvf
PlotVectorField 2 y, 1/4x , x, 6, 6 ,
y, 3, 3 , DisplayFunction Identity
Show pvf, p2, PlotRange
6, 6 , 3, 3
AspectRatio Automatic,
DisplayFunction $DisplayFunction,
Axes Automatic, AxesLabel
"x", "y"
,
An autonomous system is
one for which the
independent variable does
not explicitly occur in the
equations.
434
Chapter 6 Systems of Ordinary Differential Equations
In fact, we can show the direction ﬁeld together with several solutions.
With the following command, we use Map to apply a pure function to
the list {0.5,1,1.5,2,2.5} that solves the system if x 0
0 and
y0
i for i 0.5, 1.0, . . . , 2.5.
In[1104]:= severalsols
2y t ,
Map DSolve x t
y t
1/ 4 x t , x 0
2, y 0
# ,
x t , y t , t & , 0.5, 1, 1.5, 2, 2.5
Out[1104]=
x t
2. Cos
t
1.41421 Sin
2
y t
t
,
2
t
0.5 Cos
2
t
0.707107 Sin
,
2
x t
2 Cos
t
2
2 Sin
t
,
2
t
t
1
2 Cos
2 Sin
,
2
2
2
t
t
x t
2. Cos
,
4.24264 Sin
2
2
t
y t
1.5 Cos
2
t
,
0.707107 Sin
2
t
t
x t
2 Cos
,
2 2 Sin
2
2
t
t
1
4 Cos
y t
2 Sin
,
2
2
2
t
t
x t
2. Cos
7.07107 Sin
,
2
2
t
y t
2.5 Cos
2
t
0.707107 Sin
2
y t
We then use ParametricPlot to graph the solutions obtained in
severalsols together and display them with the direction ﬁeld,
named pvf, in Figure 6-7.
6.2 Systems of Equations: Preliminary Deﬁnitions and Theory
435
y
3
2
1
-6
-4
-2
2
4
6
x
-1
-2
-3
Figure 6-7 Direction ﬁeld associated with the system together with several solutions of
the system
In[1105]:= p3
ParametricPlot x t ,
y t /.severalsols,
t, 0, 2Sqrt 2 Π , Compiled
DisplayFunction Identity
False,
Show pvf, p3, PlotRange
6, 6 , 3, 3
AspectRatio Automatic,
DisplayFunction $DisplayFunction,
Axes Automatic, AxesLabel
"x", "y"
,
EXAMPLE 6.2.3: The Jacobi elliptic functions satisfy the nonlinear
system
du/ dt
vw
dv/ dt
uw
dw/ dt
k2 uv.
Use Mathematica to solve this system.
SOLUTION: Although Mathematica generates several error messages, we see that Mathematica is able to ﬁnd a general solution of the
system, although the result is given in terms of the Jacobi elliptic function,
JacobiSN.
In[1106]:= gensol
DSolve u
v t w t
w t
u t ,v
t
,v t
u t w t ,
kˆ2 u t v t ,
t ,w t ,t
The system is nonlinear
because of the products of
the dependent variables u, v,
and w.
For this system, t is the
independent variable; u u t ,
v v t , and w w t are the
dependent variables.
436
Chapter 6 Systems of Ordinary Differential Equations
Solve
ifun Inverse functions are being used by
Solve, so some solutions may not be found.
Solve
ifun Inverse functions are being used by
Solve, so some solutions may not be found.
Solve
ifun Inverse functions are being used by
Solve, so some solutions may not be found.
General
stop Further output of
Solve
ifun will be suppressed during this calculation.
Out[1106]=
u t
2
C 1 JacobiSN
2t
C 2
2
2
v t
2C 1
2
w t
2
k C 1
C 2
,
2 C 1 JacobiSN
C 2 C 3 ,
2C 2
2
u t
C 2 C 3 ,
2t
2
k2 C 1
C 2
,
2 k2 C 1 JacobiSN
C 2 C 3 ,
2t
C 2
2
k2 C 1
C 2
C 1 JacobiSN
C 2
,
2t
C 2
2
2
v t
2C 1
2
w t
2
k C 1
C 2
,
2 C 1 JacobiSN
C 2 C 3 ,
2C 2
2
u t
C 2 C 3 ,
k2 C 1
C 2
2t
2
,
2 k2 C 1 JacobiSN
C 2 C 3 ,
k2 C 1
C 2
C 1 JacobiSN
C 2
2t
C 2
2
,
2t
C 2
2
2
v t
C 2 C 3 ,
2C 1
2
k C 1
C 2
,
2 C 1 JacobiSN
C 2 C 3 ,
k2 C 1
C 2
2t
2
,
C 2
6.2 Systems of Equations: Preliminary Deﬁnitions and Theory
Out[1106]= w t
2 k2 C 1
2C 2
2t
SuperscriptBox JacobiSN
2
2
u t
2
437
C 2
2
k C 1
C 2
C 1 JacobiSN
2t
C 2 C 3 ,
,
C 2
2
C 2 C 3 ,
2
v t
2C 1
w t
2C 2
2
,
2 C 1 JacobiSN
C 2 C 3 ,
2
k C 1
C 2
k2 C 1
C 2
k2 C 1
C 2
C 2
,
2 k2 C 1 JacobiSN
C 2 C 3 ,
2t
2
2t
C 2
2
We use the Help Browser to obtain information regarding the JacobiSN
function as indicated in the following screen shot.
438
Chapter 6 Systems of Ordinary Differential Equations
As with other equations, under reasonable conditions, a solution to a system of
differential equations always exists.
Theorem 11 (Existence and Uniqueness). Assume that each of the functions
f1 t, x1 , x2 , . . . , xn , f2 t, x1 , x2 , . . . , xn , . . . , fn t, x1 , x2 , . . . , xn
and the partial derivatives f1 / x1 , f2 / x2 , . . . , fn / xn are continuous in a region R
containing the point t0 , y1 , y2 , . . . , yn . Then, the initial-value problem
x1
f1 t, x1 , x2 , . . . , xn
x2
f2 t, x1 , x2 , . . . , xn
(6.4)
xn
x1 t0
fn t, x1 , x2 , . . . , xn
y1 , x2 t0
y2 , . . . xn t0
yn
has a unique solution
on an interval I containing t
x1
Φ1 t
x2
Φ2 t
xn
Φn t
(6.5)
t0 .
EXAMPLE 6.2.4: Show that the initial-value problem
dx/ dt
dy/ dt
x0
2x
3y
2, y 0
xy
xy
3/ 2
has a unique solution.
DSolve is not able to ﬁnd
an explicit solution to this
nonlinear system.
SOLUTION: In this case, we identify f1 t, x, y
2x xy and f2 t, x, y
2 y and f2 / y
3 x. All four of these
3y xy with f1 / x
functions are continuous on a region containing 0, 2, 3/ 2 . Thus, by the
Existence and Uniqueness Theorem, a unique solution to the initialvalue problem exists. In this case, we use NDSolve to approximate the
solution to this nonlinear problem valid for 0 t 10.