Docsity

Numerical Method for Engineering, Study notes of Engineering

Partial preview of the text

Download Numerical Method for Engineering and more Study notes Engineering in PDF only on Docsity!

551614:Advanced Mathematics for

Mechatronics

Numerical solution for ODEs

School of Mechanical Engineering

Prescribed text :

Numerical Method for Engineering,

Seventh Edition, Steven C.Chapra,

Raymond P. Canale.,McGraw Hill 2014

Course Description

Truncation errors and the Taylor series

Numerical Solutions for ODEs

Finite difference method

Optimization

Errors in Numerical Solutions

Truncation Errors

Round-Off Errors

Total Error

  • Local Error
  • Global Error

The Taylor series

( ) (^0). 1 0. 15 0. 5 0. 25 1. 2

4 3 2

f x = − x − x − x − x +

approximation

The Remainder for the Taylor Series Expansion

Truncation Errors: Example

3 5 7 9

sin( )

3! 5! 7! 9!

x x x x

x = x − + − + +

sin 0.

 π^  π^  π 

sin 0.

Taylor’s series expansion:

The exact value:

The first-order approximation;

The truncation error:

0.5 0.4996742 0.

TR

E = − =

Round-Off Errors

Total Error

The Global Error is the total discrepancy

due to past as well as present steps

The Local Error refers to the error incurred

over a single step. It is calculated with a

Taylor series expansion.

The Global Error

The relative global error:

%TheGlobalError 100
TrueSolution NumericalSolution
TrueSolution
= ×

The Total Error: Example

%TheGlobalError 100 63.

= × =

The percent relative global error (Step 1);

The percent relative global error (Step 2);

%TheGlobalError 100 95.

= × =

17

The Total Error: Example

3 2

y  = − 2 x + 12 x − 20 x +8.

( ) ( ) ( )

2 3 4 2 3 4

2 3 4 2! 3! 4!

i i i

local

x x x

x (^) d f x (^) d f x d f

E

dx dx dx

Exact estimates of the errors in Euler’s method

6 24 20

12 24

12

y x x

y x

d f

dx

= − + −

= − +

= −





Problem statement:

The Total Error: Example

2 2 2 3 3 4 4 6(0.5) 24(0.5) 20

(0.5) 1.

2

12(0.5) 24 (0.5) 0.

3 2

12 (0.5) 0.

4 3 2

l

l

l

E

E

E

− + −

= = −

− + = =

×

− = = −

× ×

2 3 4

local

total l l l

E = E + E + E = −

The percent relative local error (Step 2);

%TheLocalError= 100 28.

3

−

× =

Numerical Solutions for ODEs

Introduction to Ordinary

Differential Equations (ODE)