You are on page 1of 8

University of Johannesburg

Faculty of Science
Department of Mathematics and Applied Mathematics
Lecturers: PG Dlamini, IK Letlhage & SM Simelane

Systems of Differential Equations

1. Introduction

A system of differential equations involves two (or more) equations which we will solve simultaneously using
Laplace Transforms. These systems arise in various fields of engineering:

Example 1: Electrical System: An electric network having more than one loop gives rise to a system of differential
equations. Its applications are common in the operation of electric transformers, television receivers, and in national
electric power networks. Another example occurs when two electrical circuits are coupled magnetically (See Fig. 1.)
where the equations relating the two currents i1 and i2 are typically:
di1
L + R(i1 − i2 ) = v(t)
dt !
di2 di1 1
R − + i2 = 0
dt dt C

where L represents inductance, R resistance, C conductance and v(t) the potential difference (pd) applied to one of the
circuits.

Figure 1: Example 1

Example 2: Mechanical System: The mechanical system in Fig. 2 consists of two bodies of mass 1 kg on three
springs of the same spring constant k and of negligibly small masses. Also damping is assumed to be practically zero.
Then the model of the physical system is the system of ODEs
00
y1 = −ky1 + k(y2 − y1 )
00
y2 = −k(y2 − y1 ) − ky2

Here y1 and y2 are the displacements of the bodies from their positions of static equilibrium. These ODEs follow from
Newton’s second law, Mass × Acceleration = Force, for a single body. We again regard downward forces as positive
and upward as negative. On the upper body, −ky1 is the force of the upper spring and k(y2 − y1 ) that of the middle
spring, y2 − y1 being the net change in spring length (think this over before going on). On the lower body, −k(y2 − y1 )
is the force of the middle spring and −ky2 that of the lower spring.

1
Figure 2: Example 2

Example 3: Mixing Problem Involving Two Tanks: Tank T 1 in Fig. 3 initially contains 100 gal of pure water.
Tank T 2 initially contains 100 gal of water in which 150 g of salt are dissolved. The inflow into T 1 is 2 gal/min from
T 2 and 6 gal/min containing 6 g of salt from the outside. The inflow into T 2 is 8 l/min from T 1 . The mixtures are kept
uniform by stirring. Find and plot the salt contents y1 (t) and y2 (t) in T 1 and T 2 , respectively. The model is obtained in
the form of two equations
Time rate of change = Inflow/min − Outflow/min
for the two tanks. Thus,
0 8 2
y1 = − y1 + y2 + 6
100 100
0 8 8
y2 = y1 − y2
100 100

Figure 3: Example 3

2. Solving Simultaneous DEs Using Laplace Transforms

We follow the four step procedure outlined before:


(i). Take the Laplace transform of both sides of each simultaneous equation by applying the formulae for the Laplace
transforms of derivatives and using a list of standard Laplace transforms.
(ii). Insert the initial conditions, i.e. x(0), y(0), x0 (0), y0 (0) etc.
(iii). Solve the simultaneous equations for L{y} and L{x} by the normal algebraic method.
(iv). Determine y and x by using, where necessary, partial fractions, completing the square etc, and taking the inverse
of each term.

2
Example 4: Solve for x and y in the following pair of simultaneous DE,
dy
+x=1
dt
dx
− y + 4et = 0
dt
given that x(0) = y(0) = 0.

Solution: We follow the four step procedure as before


(i). Take the Laplace transform
( )
dy
L + x = L {1}
dt
( )
dx
L − y + 4e = 0
t
dt
which simplifies to
1
sL{y} − y(0) + L{x} =
s
4
sL{x} − x(0) − L{y} = −
s−1
(ii). Substitute initial conditions x(0) = 0 and y(0) = 0
1
sL{y} + L{x} = (1)
s
4
− L{y} + sL{x} = − (2)
s−1
1 × Eq. (1) and s × Eq. (2) yields
1
sL{y} + L{x} = (3)
s
4s
−sL{y} + s2 L{x} = − (4)
s−1
Adding Eq. (3) and (4), we have
1 4s
(s2 + 1)L{x} = −
s s−1
(s − 1) − 4s2
=
s(s − 1)
from which
−4s2 + s − 1
L{x} = (5)
s(s − 1)(s2 + 1)
Using partial fractions
−4s2 + s − 1 A B Cs + D
= + + 2
s(s − 1)(s + 1)
2 s s−1 s +1
When s = 0: =⇒ −1 = −A, hence A = 1
When s = 1: =⇒ −4 = 2B, hence B = −2
Coefficients of s3 : =⇒ 0 = A + B + C, hence C = 1
3
Coefficient of s2 : =⇒ −4 = −A + D − C, hence D = −2
Thus
−4s2 + s − 1
L{x} =
s(s − 1)(s2 + 1)
1 2 s−2
= − + 2
s s−1 s +1
(iii). Determine x and y
( )
1 2 s−2
x=L −1
− +
s s − 1 s2 + 1
( )
−1 1 2 s 2
=L − + −
s s − 1 s2 + 1 s2 + 1

x = 1 − 2et + cos t − 2 sin t

From the second equation in the question


dx
− y + 4et = 0
dt
from which
dx
y= + 4et
dt
d
= (1 − 2et + cost − 2 sin t) + 4et
dt
= −2et − sin t − 2 cos t + 4et

y = −2et − sin t − 2 cos t + 4et

Example 5: Solve for x and y in the following pair of simultaneous DEs

d2 x
−x=y
dt2
d2 y
+ y = −x
dt2
given that x(0) = 2, y(0) = −1, x0 (0) = 0 and y0 (0) = 0.

Solution: We follow the four step procedure as before


(i). Take the Laplace transform

s2 L{x} − sx(0) − x0 (0) − L{x} = L{y}


s2 L{y} − sy(0) − y0 (0) + L{y} = −L{x}

(ii). Insert initial conditions x(0) = 2, y(0) = −1, x0 (0) = 0 and y0 (0) = 0. Hence

s2 L{x} − 2s − L{x} = L{y}


s2 L{y} + s + L{y} = −L{x}

4
(iii). Rearranging gives,

(s2 − 1)L{x} − L{y} = 2s (6)


L{x} + (s + 1)L{y} = −s
2
(7)

Eq. (6) ×(s2 + 1) and Eq. (7) × 1 gives

(s2 − 1)(s2 + 1)L{x} − (s2 + 1)L{y} = 2s(s2 + 1) (8)


L{x} + (s + 1)L{y} = −s
2
(9)

Adding Eq. (8) and (9) yields

[(s2 − 1)(s2 + 1) + 1]L{x} = 2s(s2 + 1) − s


s4 L{x} = 2s3 + s = s(2s2 + 1)

From which,

s(2s2 + 1) 2s2 + 1
L{x} = =
s4 s3
2
2s 1
= 3 + 3
s s
2 1
= + 3
s s
(iv). Determine x and y. Hence
( )
2 1
x = L−1 +
s s3
1
x = 2 + t2
2
Returning to Eq. (6) and (7) to determine y: 1 × Eq. (6) and (s2 − 1) × Eq. (7) yields,

(s2 − 1)L{x} − L{y} = 2s (10)


(s − 1)L{x} + (s − 1)(s + 1)L{y} = −s(s − 1)
2 2 2 2
(11)

Equation (10) - (11) (subtracting the two) yields,

[−1 − (s2 − 1)(s2 + 1)]L{y} = 2s + s(s2 − 1)


−s4 L{y} = s3 + s
s3 + s 1 1
L{y} = 4
=− − 3
−s s s
From which,
( )
1 1
y=L − − 3
s s
1
y = −1 − t2
2

5
3. Cramer’s Rule
We may use Cramer’s rule to solve these systems of equations. Recall Cramer’s rule from Maths 1.Given a system
of equations
a x + b y = c1
d x + e y = c2
the solution is

c1 b a c1
c e d c
2 2
x = and y =
a b a b
d e d e

Example 6: Solve the problem in example 4 using the Cramer’s rule approach.

Solution: We follow the four step procedure as before


(i). Take the Laplace transform
( )
dy
L + x = L {1}
dt
( )
dx
L − y + 4e = 0
t
dt
which simplifies to
1
sL{y} − y(0) + L{x} =
s
4
sL{x} − x(0) − L{y} = −
s−1
(ii). Substitute initial conditions x(0) = 0 and y(0) = 0
1
L{x} + sL{y} = (12)
s
4
sL{x} − L{y} = − (13)
s−1
By Cramer’s rule,
1

s s

4 1 4s
−1 − +


L{x} = s − 1 = 2 s −2 1
1 s −1 − s
s −1
−(s − 1) + 4s2
s(s − 1)
=
−1 − s2
4s2 − s + 1
=
s(s − 1)(−1 − s2 )
−4s2 + s − 1
=
s(s − 1)(s2 + 1)
The last equation is then similar to Eq. 5. Follow the subsequent steps in example 4.

6
Exercises
In the following systems, solve for x and y.
1. Solve the models in
(a) Example 1 with i1 (0) = 0 and i2 (0) = 2A. √ √
(b) Example 2 with y1 (0) = 1, y2 (0) = 0, y01 (0) = 3k and y02 (0) = − 3k.
(c) Example 3.
2.
dx dy
3 − 5 + 2x = 6
dt dt
dy dx
2 − − y = −1
dt dt
given that x(0) = 8 and y(0) = 3.
3.

y01 + y2 = 0
y1 + y02 = 2 cos t

with y1 (0) = 1 and y2 (0) = 0.


4.
dx dy
2 + 5 = 5et
dt dt
dy dx
−3 =5
dt dt
given that x(0) = y(0) = 0.
5.

y01 = 4y2 − 8 cos 4t


y02 = −3y1 − 9 sin 4t

with y1 (0) = 0 and y2 (0) = 3.


6.
dy dx
2 −y+x+ − 5 sin t = 0
dt dt
dy dx
3 + x − y + 2 − et = 0
dt dt
given that x(0) = y(0) = 0.
7.

y01 = −y2
y02 = −y1 + 2(1 − u(t − 2π)) cos t

with y1 (0) = 1 and y2 (0) = 0.


8.
d2 x
+ 2x = y
dt2
d2 y
+ 2y = x
dt2
given that x(0) = 4, y(0) = 2, x0 (0) = 0 and y0 (0) = 0.
7
9.
00
y1 = y1 + 3y2
00
y2 = 4y1 − 4et

with y1 (0) = 2, y01 (0) = 3, y2 (0) = 1 and y02 (0) = 2.


10.
00
y1 + y2 = −101 sin 10t
00
y2 + y1 = 101 sin 10t

with y1 (0) = 0, y01 (0) = 6, y2 (0) = 8 and y02 (0) = −6.


11. Forced vibrations of two masses. Solve the model in example 2 with k = 4 and initial conditions y1 (0) = 1,
y0 (0) = 1, y2 (0) = 1, y02 (0) = −1 under the assumption that the force 11 sin t is acting on the first body and the
−11 sin t on the second.
12. Mixing problem. What will happen in example 3 if you double all flows, leaving the size of the tanks and initial
conditions as before? You may first guess, then calculate. What is the relationship between the new solution
and the old obtained in exercise 1.
13. Electrical network: Using Laplace transforms, find currents i1 (t) and i2 (t) if Fig. 1, where v(t) = 390 cos t and
i1 (0) = i2 (0) = 0. How soon will the currents reach their steady states?

c Compiled by SM Simelane

You might also like