Graphics Reference
In-Depth Information
and
Figure B.58
. It is referred to as a fourth-order method because its error term is on the order
of the interval
h
to the fifth power. The advantage of using the method is that although each step
requires more computation, larger step sizes can be used, resulting in an overall computational
savings.
h
2
,
y
n
k
2
f x
n
1
f
(
x
n
, y
n
)
k
1
h
f
(
x
n
, y
n
)
⎝
y
n
y
n
h
2
,
y
n
k
2
x
n
1
(
x
n
, y
n
)
⎝
x
n
x
n
x
n
x
n
1
1
h
h
Step to midpoint (using derivative previously
computed) and compute derivative
Compute the derivative at the beginning of
the interval
A
B
h
2
,
y
n
k
2
f x
n
1
h
2
,
y
n
k
2
f
(
x
n
1
)
k
2
y
n
y
n
⎝
h
2
,
y
n
k
2
x
n
2
⎝
x
n
x
n
x
n
x
n
1
1
h
h
Step to new midpoint from initial point
using midpoint's derivative just computed
Compute the derivative at the new midpoint
C
D
h
2
,
y
n
k
2
2
f
(
x
n
2
)
3
1
y
n
k
3
y
n
4
(
x
n
h, y
n
k
3
)
x
n
x
n
1
x
n
x
n
1
h
h
Use new midpoint's derivative and step
from initial point to end of interval
Compute derivative at end of interval and
average with 3 previous derivatives to step
from initial point to next function value
E
F
FIGURE B.58
The steps in computing fourth-order Runge-Kutta.
Search WWH ::
Custom Search