MATH 175: NUMERICAL ANALYSIS II Lecturer: Jomar F. Rabajante 2nd Sem AY2012-2013 IMSP, UPLB
2nd Method: Taylor Method of Order k Consider Taylor expansion: From the Taylor Series we can have the Taylor Method of Order k:
2nd Method: Taylor Method of Order k The Taylor Method of order k has global error of order k. If a method is of order p, then if we reduce h by half, the global error will be divided by 2p. This means that ODE methods of arbitrary order exist. But, Taylor Method is only used for specialized purposes since it requires extra effort in computing derivatives.
3rd & 4th Method: Trapezoid Method O(h2) Implicit Trapezoid Method: Explicit Trapezoid Method (also called improved or modified Euler’s Method):
We call these methods as PREDICTOR-CORRECTOR METHODS. Explicit Trapezoid Method (also called improved or modified Euler’s Method): Implicit Trapezoid Method is the Corrector Predictor We call these methods as PREDICTOR-CORRECTOR METHODS.
5th & 6th Method: Midpoint Method O(h2) Implicit Midpoint Method (similar to Euler’s): Explicit Midpoint Method: where
7th Method: Runge-Kutta Methods O(hm) for m<4; we need more stages to get higher order (for m>4) Euler, Trapezoid and Midpoint Methods are R-K methods Explicit R-K method: R-K stages
7th Method: Runge-Kutta Methods The famous R-K 4: (4th order R-K) R-K 4 offers a good balance between discretization and roundoff error.
OTHER METHODS (to be discussed later) Variable Step-size methods (Adaptive) Methods for Stiff ODEs Multistep Methods We will now first focus on solving system of ODEs and higher-order ODEs.
SYSTEM OF ODEs Example: 1. Using Euler’s Method:
SYSTEM OF ODEs Using Euler’s Method: let h=0.1 (Solution with crude sensitivity/well-posedness analysis) I also perturbed the parameter: t z w pert z pert w diff z diff w 5 2 5.01 2.01 0.01 0.1 5.2 3.1 5.211 3.11601 0.011 0.01601 0.2 5.51 4.55 5.522601 4.575029 0.012601 0.025029 0.3 5.965 6.466 5.980104 6.504373 0.015104 0.038373 0.4 6.6116 9.0023 6.630541 9.060199 0.018941 0.057899 0.5 7.51183 12.36415 7.536561 12.45037 0.024731 0.086224 0.6 8.748245 16.82458 8.781598 16.95159 0.033353 0.127014 0.7 10.4307 22.74678 10.47676 22.93218 0.046055 0.185405 0.8 12.70538 30.61388 12.76998 30.88244 0.064595 0.268565 0.9 15.76677 41.06858 15.85822 41.45506 0.091452 0.386476 1 19.87363 54.96583 20.00373 55.51885 0.1301 0.553019
t z w pert z pert w diff z diff w 5 2 5.01 2.01 0.01 0.1 5.2 3.1 5.211 3.2145 0.011 0.1145 0.2 5.51 4.55 5.53245 4.860675 0.02245 0.310675 0.3 5.965 6.466 6.018518 7.115156 0.053517 0.649156 0.4 6.6116 9.0023 6.730033 10.20731 0.118433 1.205013 0.5 7.51183 12.36415 7.750764 14.45288 0.238934 2.088725 0.6 8.748245 16.82458 9.196052 20.28646 0.447807 3.46188 0.7 10.4307 22.74678 11.2247 28.30632 0.793995 5.559548 0.8 12.70538 30.61388 14.05533 39.33601 1.34995 8.722128 0.9 15.76677 41.06858 17.98893 54.50914 2.222163 13.44056 1 19.87363 54.96583 23.43985 75.38624 3.566219 20.4204 Do sensitivity analysis since our solution is prone to round-off error and HUMAN error. Perturbed parameter:
However, even though we got a solution, we should still improve this by making our h smaller. (and use a more sophisticated method)
Using h=0.001 w z
The famous R-K 4 for system of ODEs
SYSTEM OF ODEs Example: 2. Using R-K 4: To be done in the laboratory.
Using R-K 4 in Berkeley Madonna
HIGHER-ORDER ODEs Example 1: Convert this in to a system of ODEs:
HIGHER-ORDER ODEs Example 2: Convert this in to a system of ODEs: