27-One Step Methods

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

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 , and an interval I R , determine a function y : I R such that y = f ( t , y ( t )) , t I , y ( t ) = y . 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 < t 1 < t 2 < < t N h Determine values u n ' y ( t n ) ( n = 0: N h ) Numerical solution : values { u , u 1 , . . . , u N h } Time-stepping : Determine u n + 1 ' y ( t n + 1 ) at time level t = t n + 1 Initialise u y (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.5 1 1.5 2 2.5 3 3.5 4 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...
View Full Document

Page1 / 5

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

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online