Numerical Analysis – Differential Equation Hanyang University Jong-Il Park
Differential Equation
Solving Differential Equation Ordinary D.E. Partial D.E. Linear eg. Nonlinear eg. Initial value problem Boundary value problem Usually no closed-form solution linearization numerical solution
Discretization in solving D.E. Errors in Numerical Approach Discretization error Stability error y Exact sol. t Grid Points
Errors Total error truncation round-off increase as as trade-off
Local error & global error The error at the given step if it is assumed that all the previous results are all exact Global error The true, or accumulated, error
Useful concepts(I) Useful concepts in discretization Consistency Order Convergence
Useful concepts(II) stability Consistent Converge stable unstable
Stability Stability condition eg. Exact sol. Euler method Amplification factor For stability
Implicit vs. Explicit Method eg. = f Explicit : Implicit : h large y y ye h small h increase explicit t implicit t “conditionally stable” “stable”
Modification to solve D.E. Modified Differential Eq. Diff. eq. Discretization Modified D.E. Discretization by Euler method <Consistency check> <Order>
Initial Value Problem: Concept
Initial value problem Initial Value Problem Simultaneous D.E. High-order D.E.
Well-posed condition
Taylor series method(I) Truncation error
Requiring complicated Taylor series method(II) High order differentiation Implementation Complicated computation <Type 1> <Type 2> .... y t More computation accuracy y Requiring complicated source codes t Less computation accuracy
Euler method(I) Euler Method Talyor series expansion at to y .... ....
Euler method(II) Error Eg. y’ =-2x3+12x2-20x+8.5, y(0)=1
Euler method(III) Generalizing the relationship Error Analysis Euler’s approx. truncation error Error Analysis Accumulated truncation error ; 1st order
Eg. Euler method
Modified Euler method: Heun’s method Modified Euler’s Method Why a modification? error modify Predictor Average slope Corrector
Heun’s method with iteration significant improvement
Error analysis Error Analysis Taylor series Total error truncation 3rd order ; 2nd order method ※ Significant improvement over Euler’s method!
Eg. Euler vs. Modified Euler Euler Method improvement
Runge-Kutta method Runge-Kutta Method The idea Simple computation very accurate The idea where
Second-order Runge-Kutta method ① Taylor series expansion ② ③ ④ ③→① Equating ② and ④
Modified Euler - revisited set P2 P1 Modified Euler method Modified Euler method is a kind of 2nd-order Runge-Kutta method.
Other 2nd order Runge-Kutta methods Midpoint method Ralston’s method
Comparison: 2nd order R-K method
Comparison: 2nd order R-K method Eg. y’ =-2x3+12x2-20x+8.5, y(0)=1
4-th order Runge-Kutta methods Fourth-order Runge-Kutta Taylor series expansion to 4-th order accurate short, straight, easy to use P4 P3 P1 P2 ※ significant improvement over modified Euler’s method
Runge-Kutta method
Eg. 4-th order R-K method Significant improvement
Discussion Better!
Comparison (5th order)