Docsity

Central Divided Difference - Numerical Methods - Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Central Divided Difference - Numerical Methods - Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Central Divided Difference

Definition

x i

i

x

.

x

f x f x x

x

f x

lim

f(x)

Slope at

x

y

Example

ti = 16

Example :

The velocity of a rocket is given by

( ) 9. 8 , 0 30 14 10 2100

14 10 2000 ln 4

4

 − ≤^ ≤ 

  

× −

× = t t t

ν t

where ν given in m/s and (^) t is given in seconds. Use central difference approximation of

the first derivative of (^) ν ( ) t to calculate the acceleration at t = 16 s .Use a step size of

∆ t = 2 s.

( )

( ) ( )

t

t t a t

i i i ∆

2

ν 1 ν 1

Solution:

Δ t = 2

t i + 1 = ti +Δ t =^16 +^2 =^18

( )

( ) ( ) ( ) ( )

ν ν ν − ν

a =

( ) ( )

  1. 8 ( 18 ) 14 10 210018

18 2000 ln 4

4

−  

× −

×

ν = = 453. 02 m / s

( ) ( )

  1. 8 ( 14 ) 14 10 210014

14 2000 ln 4

4

^ −

× −

×

ν = = 334. 24 m / s

Example (contd.)

t i − 1 = ti −∆ t =^16 −^2 =^14

The absolute relative true error is

Example (contd.)

× 100

TrueValue

TrueValue ApproximateValue

ε t

×

Effect Of Step Size

h (^) f '( 0. 2 ) E (^) a ε (^) a % Significant digits

Et (^) ε (^) t %

0.05 80.65467 - 0.53520 0.

0.025 80.25307 - 0.4016 0.500417 1 - 0.13360 0.

0 .0125 80.15286 - 0.100212 0.125026 2 - 0.03339 0.

0.00625 80.12782 - 0.025041 0.031252 3 - 0.00835 0.

0.003125 80.12156 - 0.00626 0.007813 3 - 0.00209 0.

0.001563 80.12000 - 0.001565 0.001953 4 - 0.00052 0.

0.000781 80.11960 - 0.000391 0 .000488 5 - 0.00013 0.

0.000391 80.11951 - 9.78E- 05 0.000122 5 - 0.00003 4.07E- 05

0.000195 80.11948 - 2.45E- 05 3.05E- 05 6 - 0.00001 1.02E- 05

9.77E- 05 80.11948 - 6.11E- 06 7.63E- 06 6 0.00000 2.54E- 06

4.88E- 05 80.11947 - 1.53E- 06 1.91E- 06 7 0.00000 6.36E- 07

x f x e

4 ( ) = 9

Value of (^) ( 0. 2 ) ' f Using Central Divided Difference difference method.

Effect of Step Size on Approximate

Error

0

1 3 5 7 9 11

Num ber of steps involved, n

E(a)

Initial step size=0.

Effect of Step Size on Absolute Relative

Approximate Error

0

0 1 2 3 4 5 6 7 8 9 10 11 12

Num ber of steps involved, n

|E(a)|,%

Initial step size=0.

Effect of Step Size on True Error

-0.

-0.

-0.

-0.

-0.

-0.

0 2 4 6 8 10 12

Num ber of steps involved, n

E(t)

Initial step size=0.

Effect of Step Size on Absolute Relative

True Error

0

1 2 3 4 5 6 7 8 9 10 11

Num ber of tim es step size halved,n

|E

| %t

Initial step size=0.