dy
---- = 2 x y, y(0) = 1.
dx
Use h = 0.2.
In the table below, write first the formula above the number
(with six decimal places in scientific format).
+---------++------+--------------------+--------------------------+ | n || x(n) | yy(n) | y(n) | +---------++------+--------------------+--------------------------+ | formula || | | | | 0 || 0.0 | -- | 1.00000E+0 | | value || | | | +---------++------+--------------------+--------------------------+ | formula || | y(0)+h*2*x(0)*y(0) | y(0)+h/2*(2*x(0)*y(0) | | 1 || 0.2 | | +2*x(1)*yy(1)) | | value || | = 1.00000E+0 | = 1.04000E+0 | +---------++------+--------------------+--------------------------+ | formula || | y(1)+h*2*x(1)*y(1) | y(1)+h/2*(2*x(1)*y(1) | | 2 || 0.4 | | +2*x(2)*yy(2)) | | value || | = 1.12320E+0 | = 1.17146E+0 | +---------++------+--------------------+--------------------------+
Answer:
y(n+1) = y(n) + c(1)*f(n+1) + c(2)*f(n)where
x(n+1)
/
|
| f(x,y(x)) dx = c(1)*f(n+1) + c(2)*f(n)
|
/
x(n)
has to agree for f = 1 and f = x, so c(1) and c(2) satisfy
a linear system. Without loss of generality, we take x(n) = 0
and x(n+1) = h.
f = 1 : c(1)*1 + c(2)*1 = h f = x : c(1)*h + c(2)*0 = h^2/2So the Adams-Moulton formula we just found
y(n+1) = y(n) + h/2*(f(n+1) + f(n))is our familiar modified Euler method.