Second Order Odes: Y (X) F (X, Y)
Second Order Odes: Y (X) F (X, Y)
y 00 (x) = f (x, y)
or
y 00 (x) = f (x, y, y 0 ).
0 (x − x0 )2 00
y(x) = y(x0 ) + (x − x0 )y (x0 ) + y (x0 ) + · · · ,
2
y 0 (x) = f (x, y) = f,
d
y 00 (x) = f (x, y) = fx + fy y 0 = fx + fy f,
dx
d 00
y 000 (x) = [y (x)] = (fxx + fxy f ) + (fyx + fyy f )f + fy (fx + fy f )
dx
= fxx + 2fxy f + fyy f 2 + fy fx + fy2 f.
(x − x0 )k k
ẑk,0 (x) ≡ y0 + (x − x0 )y00 + ···+ y0 .
k!
Note that the derivatives of y become quite complicated so one usually
chooses a small value of k (k ≤ 6 or 7).
Since yj−1 will not be equal to y(xj−1 ) in general, the solution to this local
problem, zj (x), will not then be the same as y(x).
To understand and appreciate the implications of this observation we
distinguish between the ‘local’ and ‘global’ errors.
Definitions:
The local error associated with step j is zj (xj ) − yj .
The global error at xj is y(xj ) − yj .
hY (xj −x0 )L
|ej | ≤ (e − 1 ) + e(xj −x0 )L |e0 |,
2L
hY (b−a)L
≤ (e − 1 ) + e(b−a)L |e0 |.
2L
Now since ∂f x
∂y = 1 , L = 1 and since y(x) = e , we have Y = e and e0 = 0.
Applying our error bound with h = 1/N and yN ≈ y(1) = e we obtain,
he
|G E N | = |yN − e| ≤ (e − 1) < 2.4h.
2
But for h = .1 we observe that y1 0 = 2.5 9 3 7 .. with an associated true error
of .1246 .. (≡ e − y1 0 ). This error bound is .24. This is an overestimate by a
factor of 2.
Exercise: Compare the bound to the true error for h = .01, h = .001.