4.4
Numerical
methods
for
initial
value problems
So
far in
this
chapter,
we
have discussed simple
classes
of
ODEs,
for
which
it is
possible
to
produce
an
explicit formula
for the
solution. However, most
differential
equations cannot
be
solved
in
this sense. Moreover, sometimes
the
only formula
that
can be
found
is
difficult
to
evaluate, involving integrals
that
cannot
be
computed
in
terms
of
elementary functions, eigenvalues
and
eigenvectors
that
cannot
be
found
exactly,
and so
forth.
In
cases like these,
it may be
that
the
only
way to
investigate
the
solution
is to
approximate
it
using
a
numerical method, which
is
simply
an
algorithm producing
an
approximate solution.
We
emphasize
that
the use of a
numerical method always
implies
that
the
computed solution will
be in
error.
It is
essential
to
know something
about
the
magnitude
of
this error; otherwise,
one
cannot
use the
solution with
any
confidence.
Most numerical methods
for
IVPs
in
ODEs
are
designed
for first-order
scalar
equations. These
can be
applied, almost without change,
to first-order
systems,
and
hence
to
higher-order ODEs (after they have been converted
to first-order
systems).
Therefore,
we
begin
by
discussing
the
general
first-order
scalar
IVP,
which
is of the
form
We
shall discuss time-stepping methods, which seek
to find
approximations
to
n(ti),^(£2),
• • •
,u(t
n
},
where
to <
ti
<
t^
< • • • <
t
n
define
the
grid.
The
quantities
ti
—
to,t2
—
ti,...,
t
n
—
t
n
-i
are
called
the
time steps.
The
basic idea
of
time-stepping methods
is
based
on the
fundamental theorem
of
calculus, which implies
that
if
4.4. Numerical methods
for
initial
value problems
101
(a)
Rewrite (4.23)
in the
form
Notice
that
the
matrix
A is not
symmetric.
(b)
Find
the
eigenvalues
AI,
A2
and
eigenvectors
Ui,u
2
of A.
(c)
Write
the
vector-valued
function
F(t)
in the
form
Since
the
eigenvectors
ui
and
u
2
are not
orthogonal, this
will
require
solving
a (2 x 2)
system
of
equations
to find
c\
(t}
and
c
2
(t).
(d)
Write
the
solution
in the
form
and
solve
the
scalar IVPs
to get
ai
(t},
a
2
(t}.
(e)
The
desired solution
is
u(t]
=
xi(t).
Show
that
the
result
is
(4.11).
4.4. Numerical methods
for
initial value problems
(a) Rewrite (4.23) in the form
dx
dt
=
Ax
+ F(t), x(to) =
O.
Notice
that
the
matrix A
is
not symmetric.
(b) Find the eigenvalues
Al,
A2 and eigenvectors
Ul,
U2
of
A.
(c)
Write
the
vector-valued function F(t) in the form
F(t) =
Cl(t)Ul
+C2(t)U2.
101
Since
the
eigenvectors
Ul
and
U2
are not orthogonal, this will require
solving a
(2
x
2)
system of equations
to
find
Cl(t)
and
C2(t).
(d) Write
the
solution in the form
x(t) =
al(t)ul
+ a2(t)u2,
and
solve the scalar IVPs
to
get al(t), a2(t).
(e)
The desired solution
is
u(t) = Xl(t). Show
that
the
result
is
(4.11).
4.4
Numerical methods for initial value problems
So
far in this chapter,
we
have discussed simple classes of ODEs, for which it
is
possible
to
produce an explicit formula for the solution. However, most differential
equations cannot be solved in this sense. Moreover, sometimes the only formula
that
can be found
is
difficult to evaluate, involving integrals
that
cannot be computed in
terms of elementary functions, eigenvalues and eigenvectors
that
cannot be found
exactly,
and
so forth.
In cases like these, it may be
that
the
only way
to
investigate
the
solution
is
to
approximate it using a
numerical method, which
is
simply an algorithm producing
an approximate solution.
We
emphasize
that
the use of a numerical method always
implies
that
the computed solution will be in error.
It
is essential
to
know something
about
the
magnitude of this error; otherwise, one cannot use the solution with any
confidence.
Most numerical methods for IVPs in ODEs are designed for first-order scalar
equations. These can be applied, almost without change,
to
first-order systems, and
hence
to
higher-order ODEs (after they have been converted to first-order systems).
Therefore,
we
begin by discussing the general first-order scalar IVP, which
is
of the
form
du
dt
=
!(t,
u),
u(t
o
)
=
Uo·
(4.24)
We
shall discuss time-stepping methods, which seek
to
find approximations
to
U(tl),
U(t2),".,
u(t
n
),
where
to
<
tl
<
t2
< ... < tn define
the
grid.
The quantities
it
-
to,
t2
-
tl,···,
tn -
tn-l
are called the time steps.
The basic idea of time-stepping methods
is
based on
the
fundamental theorem
of calculus, which implies
that
if
du
dt (t) =
!(t,u(t)),