Title: Euler PredictorCorrector Method
1Euler Predictor-Corrector Method
Lets estimate yn1 using the Euler method and
calculate an estimate for yn1 from it.
2The Midpoint Methods
The Midpoint Method Approximating the value of
y at the midpoint (xn?x/2) Use the slope at
Midpoint to extrapolate across the interval.
1st Step Use the Euler method to find the
y-value at xn?x/2
2nd Step Evaluate the slope of the function at
the approximate midpoint
3rd Step Use the slope at the midpoint to
extrapolate all the way across the interval
32nd Order Runge-Kutta Methods
The two previous methods are not the only 2nd
order Methods!
More generally, we write the increment to y as a
weighted average of two estimates of ?y, k1 and
k2.
Question How do we find the 4 parameters a, b,
?, and ??
Answer Make the above equations agree as well as
possible with the Taylor series expansion!
42nd Order Runge-Kutta Methods
Lets look at the Taylor series expansion
with
Note that all terms are evaluated at (xn, yn)
Goal of 2nd order RK is to match the Taylor
series up to and including the O(h2) term
52nd Order Runge-Kutta Methods
We have the Taylor series expansion
and
Lets expand the last term in a 2-dimensional
Taylor series
62nd Order Runge-Kutta Methods
This has to match our original Taylor series
expansion!
72nd Order Runge-Kutta Methods
We have
and the Taylor series expansion
The following equations must be satisfied to
match the terms
82nd Order Runge-Kutta Methods
Back to 2nd order RK equations
Example Lets set a0
--gt Midpoint Method
92nd Order Runge-Kutta Methods
Back to 2nd order RK equations
Example Lets set a1/2
--gt Modified Euler
10Higher Order Runge-Kutta Methods
The higher order RK equations are obtained in a
similar manner, but the algebra becomes
messier.
The forth order RK equations are the most widely
used!
Terms need to be compared through h4, which gives
a set of 11 equations and 13 unknowns.
114th- Order Runge-Kutta Methods
The most commonly used set is
Four Evaluations of the right hand side, f(x,y),
are needed
12Example
An object at 1200K is allowed to cool down in air
at an ambient temperature of 300K. Assuming heat
is lost only due to radiation, the differential
equation for the temperature of the object is
given by
Find the temperature of the object after 480 s
using the 4th order RK method.
Lets use initially a stepsize of 240 s.
The above differential equation gives us
13Example
Initial Conditions t0 0 s T(0) 1200 K
Step 1
Step 2
14Example
Initial Conditions t0 0 s T(0) 1200 K
Step 3
Step 4
15Example
The approximate temperature at t 240 s is
Next we need to process the time interval from t
240 - 480 s
The new initial conditions are t0 240 s
T(240) 675.65 K
Now redo the 4 steps with the new initial
conditions
k1 -106.08, k2 -75.30, k3 -83.46,
k4 -60.84
---gt T(t 480s) 594.91 K
16Example
We can compare our results with the exact solution
The exact solution of the ordinary differential
equation is given by the solution of a non-linear
equation as
The solution to this nonlinear equation at t
480 seconds is
For comparison, our solution was T(t 480s)
594.91 K
17Effect of step size
Temperature at 480 seconds as a function of step
size, h
(exact)