27-One Step Methods - Discretisation Forward/backward...

This preview shows page 1 - 3 out of 5 pages.

Discretisation Forward/backward Euler Crank-Nicolson Errors One-Step Methods Dhavide Aruliah UOIT MATH 2070U c D. Aruliah (UOIT) One-Step Methods MATH 2070U 1 / 24 Discretisation Forward/backward Euler Crank-Nicolson Errors One-Step Methods 1 Discretisation of differential equations 2 Forward and backward Euler methods 3 Crank-Nicolson method 4 Errors in numerical solution of IVPs c D. Aruliah (UOIT) One-Step Methods MATH 2070U 2 / 24 Discretisation Forward/backward Euler Crank-Nicolson Errors Initial-value problem Initial-value problem Given a function f , initial data y 0 , and an interval I R , determine a function y : I R such that y = f ( t , y ( t )) , t I , y ( t 0 ) = y 0 . Solution : function y = y ( t ) that satisfies ODE and IC on I Analytical solutions (formulas) verified by substitution c D. Aruliah (UOIT) One-Step Methods MATH 2070U 4 / 24 Discretisation Forward/backward Euler Crank-Nicolson Errors Discretisation Rather than formula, seek discrete solution for DEs Choose step-size h and mesh points t 0 < t 1 < t 2 < · · · < t N h Determine values u n y ( t n ) ( n = 0: N h ) Numerical solution : values { u 0 , u 1 , . . . , u N h } Time-stepping : Determine u n + 1 y ( t n + 1 ) at time level t = t n + 1 Initialise u 0 y 0 (initial condition) for k = 0: ( N h - 1 ) Use data ( t n , u n ) , h , & function f to generate u n + 1 end for c D. Aruliah (UOIT) One-Step Methods MATH 2070U 5 / 24
Discretisation Forward/backward Euler Crank-Nicolson Errors Time-stepping 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.5 2 2.5 3 3.5 4 t Numerical solution of y = [( t - 1) 2 + 1] 1 c D. Aruliah (UOIT) One-Step Methods MATH 2070U 6 / 24 Discretisation Forward/backward Euler Crank-Nicolson Errors Forward Euler method Use forward difference to approximate y ( t n ) in y = f ( t , y ) ( δ + y )( t n ) = y ( t n + 1 ) - y ( t n ) h = f ( t n , y n ) + O ( h ) Replace y ( t n ) by u n u n + 1 - u n h + O ( h ) = f ( t n , u n ) Drop O ( h ) error u n + 1 - u n h = f ( t n , u n ) Introduce convenient shorthand notation f n : = f ( t n , u n ) , so u n + 1 - u n h = f n u n + 1 = u n + h f n c D. Aruliah (UOIT) One-Step Methods

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture