14. Finite_Difference_Method_for_Higher_Orde

14. Finite_Difference_Method_for_Higher_Orde - 3.4 Example:...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1/1 3.4 Example: Finite Difference Method for Higher Order IVPs ex. x e y xy y = + + ' ' ' ( ) 1 0 = y , () 0 0 = dx dy Find x y for 10 0 x Choose 5 . 0 = Δ x to give 21 x-locations 10 , , 5 . 0 , 0 20 1 0 = = = x x x K The ODE must hold at every x . Apply at i x i i i i x at x x at x at x at e y xy y = + + ' ' ' Substitute derivate approximations – 2 nd -order, central is the common choice i x i i i i i i i e y x y y x x y y y + + = + Δ + Δ + 2 2 1 1 2 1 1 “discretized ODE” Rearrange to solve for 1 + i y : i i i i x i x x x x y x y e x y i 2 1 2 1 2 1 2 2 1 Δ Δ Δ + Δ = + or, with 5 . 0 = Δ x ( ) i i i i x i x y x y e y i 25 . 0 1 25 . 0 1 75 . 1 25 . 0 1 1 + + = + [ À ] Eqn [ À ] is an algebraic eqn for 1 + i y in terms of i y and 1 i y . ICs give the first two values 1 0 = y 1 0 = y 0 0 = = x dx dy 1 st order forward diff 0 0 1 = Δ x y y 1 0 1 = = y y Now start using eqn [ À ] 1 0 , y y get 2 y 2 1 , y y get 3 y K Excel implementation is straight forward. column B: set up x grid with 5 . 0 = Δ x cell C2:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/16/2011 for the course ME 303 taught by Professor Serhiyyarusevych during the Spring '10 term at Waterloo.

Ask a homework question - tutors are online