If you chose the stepsize appropriately to ensure the exact same number of
function evaluations, RK4 will quite likely give a far more accurate solution than Euler’s
method for the same amount of “work”. So yes, highorder methods are worth it.
Another important fact is that, for all methods, additional effort will tend to lead to dimin
ishing returns. This means that at some point performing additional function evaluations
(making the stepsize smaller) will not give a significant improvement in accuracy.
Ian Jeffrey
207
Lecture 20: HigherOrder RungeKutta Methods
March 26, 2019
20.5
Systems of Ordinary Differential Equations
Many engineering problems involve solving systems of ordinary differential equations. We
will consider systems of firstorder ODEs.
A general system of firstorder ODEs is:
dy
1
dx
=
f
1
(
x, y
1
, y
2
, . . . , y
n
)
dy
2
dx
=
f
2
(
x, y
1
, y
2
, . . . , y
n
)
.
.
.
dy
n
dx
=
f
n
(
x, y
1
, y
2
, . . . , y
n
)
Here we must stress that the
y
j
are
not different sample values
but are instead different
dependent variables (we could have used
u, v, w
etc., but would have quickly run out of
letters). Notice also that the righthandside function changes as denoted by the subscript.
Key Concept
: What is so important about systems of ODEs? Many engineering appli
cations require them directly (think of a circuit with multiple capacitors/inductors). Also,
highorder ODEs can be reduced to systems of firstorder ODEs which makes their numer
ical solution quite convenient.
Example
: Consider Newton’s Second Law in one dimension
F
=
ma
This is equivalent to the secondorder linear ODE:
d
2
x
dt
2
=
F
m
which can be decomposed into two first order ODEs:
dv
dt
=
F
m
dx
dt
=
v
where
v
is the velocity and
x
is the position of the mass. Solving for the positions of the
planets in our solar system would extend these equations to two dimensions (assuming
planets revolve in a common plane).
Ian Jeffrey
208
Lecture 20: HigherOrder RungeKutta Methods
March 26, 2019
Example
: Consider the following thirdorder ODE
d
3
y
dx
3
= 2
x

3
y
+ 4
dy
dx
+
x
d
2
y
dx
2
To solve this ODE IVP we need 3 initial conditions, for example:
y
(0) = 3,
dy
dx
x
=0
= 2 and
d
2
y
dx
2
x
=0
= 7 (the actual values aren’t important for our purposes).
One way of solving this thirdorder ODE is to reduce it to a system of 3 firstorder
ODEs. We let:
w
1
=
dy
dx
,
w
1
(0) = 2
w
2
=
dw
1
dx
=
,
d
2
y
dx
2
w
2
(0) = 7
Substituting these relationships into the original ODE gives:
dy
dx
=
w
1
dw
1
dx
=
w
2
dw
2
dx
= 2
x

3
y
+ 4
w
1
+
xw
2
where, in the last equation we have used the fact that
dw
2
dx
=
d
3
y
dx
3
. The result is just a system
of firstorder ODE IVPs which can be solved using standard RK methods.
Key Concept
: RungeKutta methods can be applied to systems of firstorder ODEs in
a straightforward manner that simply extends our usual application of RK methods for a
single ODE.
You've reached the end of your free preview.
Want to read all 9 pages?
 Winter '16
 Ian Jeffery
 Numerical Analysis, Yi, Midpoint method, Runge–Kutta methods