Docsity

Truncation Error - Numerical Methods - Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Truncation Error - Numerical Methods - Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Truncation Error

Truncation error

• Error caused by truncating or

approximating a mathematical procedure.

Another Example of Truncation Error

Using a finite ∆ x^ to approximate f^ ′( x )

x

f x x f x

f x

P

Q

secant line

tangent line

Figure 1. Approximate derivative using finite Δx

Another Example of Truncation Error

Using finite rectangles to approximate an

integral.

y = x 2

0

30

60

90

0 1.5 3 4.5 6 7.5 9 10.5 12

y

x

Example 2 —Differentiation

∆ x = 0. 1

Find f^ ′(^3 ) for

2

f ( x ) = x using

x

f x x f x

f x

and ∆ x = 0. 2

' f f

f

f ( 3. 2 )− f ( 3 )

  1. 2

  2. 2 3

2 2 − =

= =^6.^2

The actual value is

( ) 2 ,

'

f x = x ( 3 ) 2 3 6

'

f = × =

Truncation error is then, 6 −^6.^2 = −^0.^2

Can you find the truncation error with

Example 3 — Integration

∫

9

3

x^2 dx

Use two rectangles of equal width to

approximate the area under the curve for

2

f ( x ) = x over the interval^ [^3 ,^9 ]

y = x 2

0

30

60

90

0 3 6 9 12

y

x