11—Numerical Analysis 280
The next orders are
0 =
∑
k
αk(−kh) +h
∑
k
βk
0 =
∑
k
1
2
αk(−kh)^2 +h
∑
k
βk(−kh)
..
. (11.46)
N= 1is Euler’s method again.
N= 2gives
α 1 +α 2 = 1
α 1 + 4α 2 = 2(β 1 + 2β 2 )
α 1 + 2α 2 =β 1 +β 2
α 1 + 8α 2 = 3(β 1 + 4β 2 )
The solution of these equations is
α 1 =− 4 α 2 = +5 β 1 = +4 β 2 = +2
y(0) =− 4 y(−h) + 5y(− 2 h) +h
[
4 y′(−h) + 2y′(− 2 h)
]
(11.47)
To start this algorithm off, you need two pieces of information: the values ofyat−hand at− 2 h.
This is in contrast to Runge-Kutta, which needs only one point.
Example: Solvey′=y y(0) = 1 (h= 0.1)
I could use Runge-Kutta to start and then switch to Adams as soon as possible. For the purpose of
this example, I’ll just take the exact value ofyatx= 0. 1.
e.^1 = 1. 105170918
y(.2) =− 4 y(.1) + 5y(0) +. 1
[
4 f
(
. 1 ,y(.1)
)
+ 2f
(
0 ,y(0)
)]
=− 4 y(.1) + 5y(0) +. 4 y(.1) +. 2 y(0)
=− 3. 6 y(.1) + 5. 2 y(0)
= 1. 221384695
The exact value ise.^2 = 1. 221402758 ; the first error is in the underlined term. Continuing the calculation
to higher values of x,
x y
.3 1.34990 38
.4 1.4915 47
.5 1.6489 31
.6 1.819 88
.7 2.02 28
.8 2.18 12
.9 2.6 66
1.0 1 .74
1.1 7.59
1.2 −18.26
1.3 105.22^0..^51.
Everything is going very smoothly for a while, though the error is creeping up. At aroundx= 1,
the numerical solution goes into wild oscillation and is completely unstable. The reason for this is in