ODEs  1
20  Numerical Solutions of Ordinary
Differential Equations with Initial Values
Motivation
Many engineering problems require the solution of differential equations.
Suppose that we know the derivative of a function,
y’(t)
in terms of some function g
which is a function of
y(t)
and
t
.
In other words
)
),
(
(
)
(
'
t
t
y
g
t
y
=
And we also know the value of
y
at some initial point
t
0
.
We want to compute the value of the function at future times.
The difference between this problem and numerical integration is that the derivative is
not given to us explicitly. It is, instead, given to us implicitly, in terms of
y
(
t
) and
t
.
As an example let’s consider the equation that governs many types of phenomena such as
the decay of C
14
atoms over time, which is used to agedate materials. If
y
(
t
) represents
the mass of C
14
atoms at any instant in time, the decay of carbon atoms is given by
y'
(
t
) = —
k
y
(
t
)
where
year
k
1
10
*
21
.
1
4
−
=
Now, to determine
y
(
t
), we need to use this equation along with some initial estimate of
the mass
y
(
t
0
). In archaeology,
t
0
would be the time when the artifact was made.
In this example there is a simple analytical expression for
y
(
t
):
(
)
0
)
(
0
)
(
0
t
t
e
t
y
t
y
t
t
k
≥
=
−
−
In many instances, however, an analytical expression may not be obtainable (particularly
if you haven’t yet taken differential equations).
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
ODEs  2
Euler’s Method
One method of solving differential equations is called
Euler’s method
.
It makes use of an
approximation to
y’(x)
which transforms the ODE into an algebraic equation.
We start with a Taylor series expansion about a particular time
t
n
for
y(t):
...
!
)
(
...
)
(
'
)
(
)
(
)
(
+
∆
+
+
∆
+
=
∆
+
n
t
t
y
t
t
y
t
y
t
t
y
n
n
n
n
n
n
Now we take the first two terms of the expansion to get
t
t
y
t
y
t
t
y
n
n
n
∆
+
≈
∆
+
)
(
'
)
(
)
(
Now let
t
n+1
=
t
n
+
∆
t
and assume that
∆
t
is a positive constant which we are given.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Patzek
 Numerical Analysis, Derivative, Method, Euler’s Method, Numerical ordinary differential equations

Click to edit the document details