You are on page 1of 16

FINITE DIFFERENCE SCHEMES FOR

ORDINARY DIFFERENTIAL
EQUATIONS

1
Introduction
 Taylor series

Where is the order derivative of evaluated at

Assume a smooth function , we then consider a small step size,

2
Introduction
 Rearranging A & B we could obtain A1 and B1 respectively. Similarly, adding A and B, we obtain C1

A1 - Forward difference formula

B1 - Backward difference formula

C1 – Centered difference formula

For forward and backward difference, , so they are First order schemes

For Centered difference, , so it’s a second order scheme

3
Introduction
 Taylor theorem in

Assume scalar valued function is twice continuously differentiable

Gradient of

Hessian matrix of

4
 Finite differences for higher order

Left sided FD first order

Left sided FD second order

Right sided FD first order

Right sided FD second order

Central FD second order

Central FD fourth order

5
Plot of Error vs. grid size

 Plot1 of Error vs. grid spacing for

1: Moin, P., Fundamentals of Engineering Numerical Analysisi, 2nd ed., Cambridge University Press (2010)
 Plot1 of Taylor series for a polynomial function at

1. Chapra, S. C and Canale, R. P. Numerical Methods for Engineers 7th ed ., McGraw-Hill Education
 Finite differences for higher order

Left sided FD first order

Left sided FD second order

Right sided FD first order

Right sided FD second order

Central FD second order

Central FD fourth order

We can also find the coefficients via the method of Lagrangian interpolants

8
 Taylor Tables

They provide a systematic way of determining the coefficients for a Taylor series.
For example:

find

3 unknowns 3 equations

Express the desired finite difference as a linear combination of functional evaluations and coefficients

Equate the coefficients of , and to zero.

9
 

Illustrative diagram for a Taylor table1

10

1: Moin, P., Fundamentals of Engineering Numerical Analysisi, 2nd ed., Cambridge University Press (2010)
 Ordinary Differential Equation

We would consider Initial value problems

ODE’s have only one independent variable, usually denoted as or

Second order vs. first order


Second order linear
First order

Implicit vs. Explicit


Explicit

Linear vs. Non Linear

Every order equation can be expressed as a system of first order ODE’s

We only consider Linear, first order ODE’s of the form


11
 Ordinary Differential Equation

Chemical reaction kinetics

Linear ODE

Predator Prey population dynamics


Non Linear ODE

12
 Methods of solution for ODE’s
Euler (Forward Euler)
a measure of the step size which determines the accuracy

Stability restriction by the largest in matrix Conditionally stable

 Plots illustrating the solution technique for the Forward Euler method 1 for

13

1. Chapra, S. C and Canale, R. P. Numerical Methods for Engineers 7th ed ., McGraw-Hill Education
 Methods of solution for ODE’s

Runge Kutta Schemes

Fourth order RK Scheme – Classical fourth order


Scheme

Plots illustrating the solution technique for the RK 4th order


method

Larger stability bound


14

1. Chapra, S. C and Canale, R. P. Numerical Methods for Engineers 7th ed ., McGraw-Hill Education
Comparing stability bounds for Explicit
schemes 15
Thank you and
Questions

16

You might also like