You are on page 1of 6

Linear Systems of ODEs

Here is a system of two ODEs whose coefficient matrix has real and distinct eigenvalues.

A = 884, - 6<, 81, - 1<<;

Eigenvalues@AD
82, 1<

X@t_D = 8x@tD, y@tD<;

system = X '@tD Š A.X@tD;

This solves the system. Note that the general solution depends on two arbitrary constants

RefLinkB C , paclet : ref  C F @1D and RefLinkB C , paclet : ref  C F @2D.

sol = DSolve@system, 8x, y<, tD


99x ® FunctionA8t<, ãt I- 2 + 3 ãt M C@1D - 6 ãt I- 1 + ãt M C@2DE,
y ® FunctionA8t<, ãt I- 1 + ãt M C@1D - ãt I- 3 + 2 ãt M C@2DE==

Here is a plot of some particular solutions obtained by giving specific values to RefLinkB C , paclet : ref  C F @1D and

RefLinkB C , paclet : ref  C F @2D. In this case, the origin is called a node.

particularsols =
Partition@Flatten@Table@8x@tD, y@tD< . sol . 8C@1D ® 1  i, C@2D ® 1  j<,
8i, - 20, 20, 6<, 8j, - 20, 20, 6<DD, 2D;

ParametricPlot@Evaluate@particularsolsD, 8t, - 3, 3<, PlotRange -> 8- 2, 2<D


2 ModelMatematika_SistemPDBlinearOrde1_2023.nb

In this system, the eigenvalues of the coefficient matrix are complex conjugates of each other.

A = 887, - 8<, 85, - 5<<;

Eigenvalues@AD
81 + 2 ä, 1 - 2 ä<

X@t_D = 8x@tD, y@tD<;

system = X '@tD Š A.X@tD;

This solves the system.

sol = DSolve@system, 8x, y<, tD

::x ® FunctionA8t<, - 4 ãt C@2D Sin@2 tD + ãt C@1D HCos@2 tD + 3 Sin@2 tDLE,

y ® FunctionB8t<, ãt C@2D HCos@2 tD - 3 Sin@2 tDL +


5
ãt C@1D Sin@2 tDF>>
2

This plots the solution for various values of the arbitrary parameters. The spiraling behavior is typical for systems with complex
eigenvalues.
particularsols =
Partition@Flatten@Table@8x@tD, y@tD< . sol . 8C@1D ® 1  i, C@2D ® 1  j<,
8i, - 10, 10, 8<, 8j, - 10, 10, 8<DD, 2D;

ParametricPlot@Evaluate@particularsolsD, 8t, - 35, 35<,


PlotRange ® All, PlotPoints ® 70, Method -> 8Compiled ® False<D

Solving homogeneous systems of ODEs with constant coefficients and of arbitrary order is a straight-
forward matter. They are solved by converting them to a system of first-order ODEs.

This solves a homogeneous system of ODEs of order 3, with constant coefficients.

system = 8x '''@tD + y@tD, y '''@tD - 64 x@tD<;


ModelMatematika_SistemPDBlinearOrde1_2023.nb 3

sol = DSolve@8system@@1DD Š 0, system@@2DD Š 0<, 8x, y<, tD

::x ® FunctionB8t<, C@1D JCos@tD + ã2


1 1
ã- 3 t 3 t
Cos@tD + ã 3 t
Cos@2 tDN + ã- 3 t
3 96
C@5D JCos@tD + ã2 3 t
Cos@tD - 2 ã 3 t
Cos@2 tD + 3 Sin@tD - 3 ã2 3 t
Sin@tDN +

C@3D JCos@tD + ã2
1
ã- 3 t 3 t
Cos@tD - 2 ã 3 t
Cos@2 tD -
24
1
3 Sin@tD + 3 ã2 3 t
Sin@tDN + ã- 3 t
C@6D
192
J- 3 Cos@tD + 3 ã2 3 t
Cos@tD - Sin@tD - ã2 3 t
Sin@tD - 2 ã 3 t
Sin@2 tDN -

C@4D JSin@tD + ã2
1 1
ã- 3 t 3 t
Sin@tD - ã 3 t
Sin@2 tDN + ã- 3 t
C@2D
24 12
J- 3 Cos@tD + 3 ã2 3 t
Cos@tD + Sin@tD + ã2 3 t
Sin@tD + 2 ã 3 t
Sin@2 tDNF,

C@4D JCos@tD + ã2
1 2
y ® FunctionB8t<, ã- 3 t 3 t
Cos@tD + ã 3 t
Cos@2 tDN - ã- 3 t
3 3
C@2D JCos@tD + ã2 3 t
Cos@tD - 2 ã 3 t
Cos@2 tD + 3 Sin@tD - 3 ã2 3 t
Sin@tDN +

C@6D JCos@tD + ã2
1
ã- 3 t 3 t
Cos@tD - 2 ã 3 t
Cos@2 tD -
24
1
3 Sin@tD + 3 ã2 3 t
Sin@tDN - ã- 3 t
C@3D
3
J- 3 Cos@tD + 3 ã2 3 t
Cos@tD - Sin@tD - ã2 3 t
Sin@tD - 2 ã 3 t
Sin@2 tDN +

C@1D JSin@tD + ã2
8 1
ã- 3 t 3 t
Sin@tD - ã 3 t
Sin@2 tDN + ã- 3 t
C@5D
3 12
J- 3 Cos@tD + 3 ã2 3 t
Cos@tD + Sin@tD + ã2 3 t
Sin@tD + 2 ã 3 t
Sin@2 tDNF>>

This verifies the solution.

system . sol@@1DD . 8t ® RandomComplex@D, C@1D ® RandomComplex@D,


C@2D ® RandomComplex@D, C@3D ® RandomComplex@D, C@4D ® RandomComplex@D,
C@5D ® RandomComplex@D, C@6D ® RandomComplex@D<  Chop
80, 0<

In general, systems of linear ODEs with non-constant coefficients can only be solved in cases where
the coefficient matrix has a simple structure, as illustrated in the following examples.

This first-order system has a diagonal coefficient matrix. The system is uncoupled because the first equation involves only x@tD and the
second equation depends only on y@tD. Thus, each equation in the system can be integrated independently of the other.
DSolve@8x '@tD Š Sin@tD * x@tD, y '@tD Š t ^ 2 * y@tD<, 8x, y<, tD

::x ® FunctionA8t<, ã-Cos@tD C@1DE, y ® FunctionB8t<, ã 3 C@2DF>>


t3

The rows of the coefficient matrix for this system form an orthogonal set of vectors.

A = 88E ^ t, Tan@tD<, 8- Tan@tD, E ^ t<<;

A.Transpose@AD  Det@AD
881, 0<, 80, 1<<

X@t_D = 8x@tD, y@tD<;


4 ModelMatematika_SistemPDBlinearOrde1_2023.nb

system = X '@tD Š A.X@tD;

sol = DSolve@system, 8x, y<, tD

99x ® FunctionA8t<, ãã C@1D Cos@Log@Cos@tDDD - ãã C@2D Sin@Log@Cos@tDDDE,


t t

t t
y ® FunctionA8t<, ãã C@2D Cos@Log@Cos@tDDD + ãã C@1D Sin@Log@Cos@tDDDE==

system . sol@@1DD  Simplify


True

Here is a system of three first-order ODEs. The coefficient matrix is upper triangular.

A = 88E ^ t, 2, 3<, 80, 2, - 1<, 80, 0, 1<<;

MatrixForm@AD
ãt 2 3
0 2 -1
0 0 1

X@t_D = 8x@tD, y@tD, z@tD<;

system = X '@tD Š A.X@tD;

sol = DSolve@system, 8x, y, z<, tD

99x ® FunctionA8t<, ãã C@1D + 2 I- 1 - ãt M C@2D - 5 C@3DE,


t

y ® FunctionA8t<, ã2 t C@2D + ãt C@3DE, z ® FunctionA8t<, ãt C@3DE==

As for single ODEs, there are sophisticated modern algorithms for solving systems of ODEs with
rational coefficients.

This solves a system of two first-order ODEs with rational coefficients. Note that the solution is composed entirely of rational
functions.
H5 + xL w@xD H6 + 2 x - 3 x3 - x5 L y@xD
DSolveB:y¢ @xD Š
H- 3 - 2 x + x2 L H- 1 + x3 L x H- 3 - 2 x + x2 L H- 1 + x3 L
+ ,

H1 + 20 x2 + 3 x3 L w@xD 4 x H- 3 - 2 x + x2 L y@xD
w¢ @xD Š >, 8y, w<, xF
H5 + xL H- 1 + x3 L H5 + xL H- 1 + x3 L
-

::w ® FunctionB8x<, - F,
C@1D x4 C@2D
3 H5 + xL 3 H5 + xL
-

F>>
x C@1D x2 C@2D
3 H- 3 + xL H1 + xL 3 H- 3 + xL H1 + xL
y ® FunctionB8x<, - -

In the following example, the algorithm finds one rational solution for x@tD and y@tD. (The equation for z@tD is uncoupled from the rest

of the system.) Using the rational solution, RefLinkB DSolve , paclet : ref  DSolve F is able to find the remaining

exponential solution for x@tD and y@tD.


system = 8x '@tD Š H2 * HH- 9 + t + t ^ 2L * x@tD + H- 6 + t ^ 2L * y@tDLL  HH- 2 + tL * tL,
y '@tD Š H- 3 * H- 12 + 2 * t + t ^ 2L * x@tD + H24 - 2 * t - 3 * t ^ 2L * y@tDL  HH- 2 + tL * tL,
z '@tD Š t * z@tD<;
ModelMatematika_SistemPDBlinearOrde1_2023.nb 5

sol = DSolve@system, 8x, y, z<, tD


H2 + tL C@1D
::x ® FunctionB8t<, + ã-t C@2DF,
2 t3
H- 4 - tL C@1D 3 -t t 2

y ® FunctionB8t<, - ã C@2DF, z ® FunctionB8t<, ã 2 C@3DF>>


2 t3 2

system . sol  Simplify


88True, True, True<<

The systems considered so far have all been homogeneous. If the system is inhomogeneous (that
is, if there are terms free from any dependent variables and their derivatives),

RefLinkA DSolve , paclet : ref  DSolve E applies either the method of variation of parame-

ters or the method of undetermined coefficients to find the general solution.

This solves an inhomogeneous system.

A = 887, - 8<, 85, - 5<<;

B = 8E ^ Ht  10L, t<;

X@t_D = 8x@tD, y@tD<;

system = X '@tD Š A.X@tD + B;

sol = DSolve@system, 8x, y<, tD

::x ® FunctionB8t<, - 4 ãt C@2D Sin@2 tD + ãt C@1D HCos@2 tD + 3 Sin@2 tDL -

ã-t H18 + 70 tL Cos@2 tD +


500 1
4 ãt Sin@2 tD ã-9 t10 Cos@2 tD -
481 50

ã-t H- 26 + 10 tL Sin@2 tD +
225 1
ã-9 t10 Sin@2 tD -
481 50

ãt HCos@2 tD + 3 Sin@2 tDL ã H4 + 10 tL Cos@2 tD +


510 -9 t10 4 -t
ã Cos@2 tD -
481 25

ã H- 6 + 10 tL Sin@2 tD F,
470 -9 t10 2 -t
ã Sin@2 tD -
481 25

y ® FunctionB8t<, ãt C@2D HCos@2 tD - 3 Sin@2 tDL + ãt C@1D Sin@2 tD +


5
2

ãt HCos@2 tD - 3 Sin@2 tDL ã H18 + 70 tL Cos@2 tD +


500 1 -t
ã-9 t10 Cos@2 tD -
481 50

ã H- 26 + 10 tL Sin@2 tD +
225 -9 t10 1 -t
ã Sin@2 tD -
481 50

ã H4 + 10 tL Cos@2 tD +
5 t 510 -9 t10 4 -t
ã Sin@2 tD ã Cos@2 tD -
2 481 25

ã H- 6 + 10 tL Sin@2 tD F>>
470 -9 t10 2 -t
ã Sin@2 tD -
481 25

Particular solutions to the system can be obtained by assigning values to the constants

RefLinkA C , paclet : ref  C E @1D and RefLinkA C , paclet : ref  C E @2D.

Here is a plot of the solution for one choice of parameters.

particularsol = 8x@tD, y@tD< . sol@@1DD . 8C@1D ® - 1, C@2D ® 2<;


6 ModelMatematika_SistemPDBlinearOrde1_2023.nb

Plot@Evaluate@particularsolD, 8t, 0, Pi<D

Related Tutorials

Differential Equation Solving with DSolve

Tutorial Collection

WebLinkB Differential Equation Solving with DSolve ,

http :  www.wolfram.com  learningcenter  tutorialcollection 


F
DifferentialEquationSolvingWithDSolve 

WebLinkB Mathematics and Algorithms ,

http :  www.wolfram.com  learningcenter  tutorialcollection  MathematicsAndAlgorithms  F

You might also like