fbpx
Wikipedia

Truncation error

In numerical analysis and scientific computing, truncation error is an error caused by approximating a mathematical process.[1][2]

Examples edit

Infinite series edit

A summation series for   is given by an infinite series such as

 

In reality, we can only use a finite number of these terms as it would take an infinite amount of computational time to make use of all of them. So let's suppose we use only three terms of the series, then

 

In this case, the truncation error is  

Example A:

Given the following infinite series, find the truncation error for x = 0.75 if only the first three terms of the series are used.

 

Solution

Using only first three terms of the series gives

 

The sum of an infinite geometrical series

 
is given by
 

For our series, a = 1 and r = 0.75, to give

 

The truncation error hence is

 

Differentiation edit

The definition of the exact first derivative of the function is given by

 

However, if we are calculating the derivative numerically,   has to be finite. The error caused by choosing   to be finite is a truncation error in the mathematical process of differentiation.

Example A:

Find the truncation in calculating the first derivative of   at   using a step size of  

Solution:

The first derivative of   is

 
and at  ,
 

The approximate value is given by

 

The truncation error hence is

 

Integration edit

The definition of the exact integral of a function   from   to   is given as follows.

Let   be a function defined on a closed interval   of the real numbers,  , and

 
be a partition of I, where
 
 
where   and  .

This implies that we are finding the area under the curve using infinite rectangles. However, if we are calculating the integral numerically, we can only use a finite number of rectangles. The error caused by choosing a finite number of rectangles as opposed to an infinite number of them is a truncation error in the mathematical process of integration.

Example A.

For the integral

 
find the truncation error if a two-segment left-hand Riemann sum is used with equal width of segments.

Solution

We have the exact value as

 

Using two rectangles of equal width to approximate the area (see Figure 2) under the curve, the approximate value of the integral

 
 

Occasionally, by mistake, round-off error (the consequence of using finite precision floating point numbers on computers), is also called truncation error, especially if the number is rounded by chopping. That is not the correct use of "truncation error"; however calling it truncating a number may be acceptable.

Addition edit

Truncation error can cause   within a computer when   because   (like it should), while  . Here,   has a truncation error equal to 1. This truncation error occurs because computers do not store the least significant digits of an extremely large integer.

See also edit

References edit

  1. ^ Atkinson, Kendall E. (1989). An Introduction to Numerical Analysis (2nd ed.). New York: Wiley. p. 20. ISBN 978-0-471-62489-9. OCLC 803318878.
  2. ^ Stoer, Josef; Bulirsch, Roland (2002), Introduction to Numerical Analysis (3rd ed.), Princeton, N.J.: Recording for the Blind & Dyslexic, OCLC 50556273, retrieved 2022-02-08

truncation, error, other, uses, numerical, integration, numerical, analysis, scientific, computing, truncation, error, error, caused, approximating, mathematical, process, contents, examples, infinite, series, differentiation, integration, addition, also, refe. For other uses see Truncation error numerical integration In numerical analysis and scientific computing truncation error is an error caused by approximating a mathematical process 1 2 Contents 1 Examples 1 1 Infinite series 1 2 Differentiation 1 3 Integration 1 4 Addition 2 See also 3 ReferencesExamples editInfinite series edit A summation series for e x displaystyle e x nbsp is given by an infinite series such ase x 1 x x 2 2 x 3 3 x 4 4 displaystyle e x 1 x frac x 2 2 frac x 3 3 frac x 4 4 cdots nbsp In reality we can only use a finite number of these terms as it would take an infinite amount of computational time to make use of all of them So let s suppose we use only three terms of the series thene x 1 x x 2 2 displaystyle e x approx 1 x frac x 2 2 nbsp In this case the truncation error is x 3 3 x 4 4 displaystyle frac x 3 3 frac x 4 4 cdots nbsp Example A Given the following infinite series find the truncation error for x 0 75 if only the first three terms of the series are used S 1 x x 2 x 3 x lt 1 displaystyle S 1 x x 2 x 3 cdots qquad left x right lt 1 nbsp SolutionUsing only first three terms of the series givesS 3 1 x x 2 x 0 75 1 0 75 0 75 2 2 3125 displaystyle begin aligned S 3 amp left 1 x x 2 right x 0 75 amp 1 0 75 left 0 75 right 2 amp 2 3125 end aligned nbsp The sum of an infinite geometrical seriesS a a r a r 2 a r 3 r lt 1 displaystyle S a ar ar 2 ar 3 cdots r lt 1 nbsp is given by S a 1 r displaystyle S frac a 1 r nbsp For our series a 1 and r 0 75 to giveS 1 1 0 75 4 displaystyle S frac 1 1 0 75 4 nbsp The truncation error hence isT E 4 2 3125 1 6875 displaystyle mathrm TE 4 2 3125 1 6875 nbsp Differentiation edit The definition of the exact first derivative of the function is given byf x lim h 0 f x h f x h displaystyle f x lim h to 0 frac f x h f x h nbsp However if we are calculating the derivative numerically h displaystyle h nbsp has to be finite The error caused by choosing h displaystyle h nbsp to be finite is a truncation error in the mathematical process of differentiation Example A Find the truncation in calculating the first derivative of f x 5 x 3 displaystyle f x 5x 3 nbsp at x 7 displaystyle x 7 nbsp using a step size of h 0 25 displaystyle h 0 25 nbsp Solution The first derivative of f x 5 x 3 displaystyle f x 5x 3 nbsp isf x 15 x 2 displaystyle f x 15x 2 nbsp and at x 7 displaystyle x 7 nbsp f 7 735 displaystyle f 7 735 nbsp The approximate value is given byf 7 f 7 0 25 f 7 0 25 761 5625 displaystyle f 7 frac f 7 0 25 f 7 0 25 761 5625 nbsp The truncation error hence isT E 735 761 5625 26 5625 displaystyle mathrm TE 735 761 5625 26 5625 nbsp Integration edit The definition of the exact integral of a function f x displaystyle f x nbsp from a displaystyle a nbsp to b displaystyle b nbsp is given as follows Let f a b R displaystyle f a b to mathbb R nbsp be a function defined on a closed interval a b displaystyle a b nbsp of the real numbers R displaystyle mathbb R nbsp andP x 0 x 1 x 1 x 2 x n 1 x n displaystyle P left x 0 x 1 x 1 x 2 dots x n 1 x n right nbsp be a partition of I where a x 0 lt x 1 lt x 2 lt lt x n b displaystyle a x 0 lt x 1 lt x 2 lt cdots lt x n b nbsp a b f x d x i 1 n f x i D x i displaystyle int a b f x dx sum i 1 n f x i Delta x i nbsp where D x i x i x i 1 displaystyle Delta x i x i x i 1 nbsp and x i x i 1 x i displaystyle x i in x i 1 x i nbsp This implies that we are finding the area under the curve using infinite rectangles However if we are calculating the integral numerically we can only use a finite number of rectangles The error caused by choosing a finite number of rectangles as opposed to an infinite number of them is a truncation error in the mathematical process of integration Example A For the integral 3 9 x 2 d x displaystyle int 3 9 x 2 dx nbsp find the truncation error if a two segment left hand Riemann sum is used with equal width of segments SolutionWe have the exact value as 3 9 x 2 d x x 3 3 3 9 9 3 3 3 3 234 displaystyle begin aligned int 3 9 x 2 dx amp left frac x 3 3 right 3 9 amp left frac 9 3 3 3 3 right amp 234 end aligned nbsp Using two rectangles of equal width to approximate the area see Figure 2 under the curve the approximate value of the integral 3 9 x 2 d x x 2 x 3 6 3 x 2 x 6 9 6 3 2 3 6 2 3 27 108 135 displaystyle begin aligned int 3 9 x 2 dx amp approx left left x 2 right right x 3 6 3 left left x 2 right right x 6 9 6 amp 3 2 3 6 2 3 amp 27 108 amp 135 end aligned nbsp Truncation Error Exact Value Approximate Value 234 135 99 displaystyle begin aligned text Truncation Error amp text Exact Value text Approximate Value amp 234 135 amp 99 end aligned nbsp Occasionally by mistake round off error the consequence of using finite precision floating point numbers on computers is also called truncation error especially if the number is rounded by chopping That is not the correct use of truncation error however calling it truncating a number may be acceptable Addition edit Truncation error can cause A B C A B C displaystyle A B C neq A B C nbsp within a computer when A 10 25 B 10 25 C 1 displaystyle A 10 25 B 10 25 C 1 nbsp because A B C 0 C 1 displaystyle A B C 0 C 1 nbsp like it should while A B C A B 0 displaystyle A B C A B 0 nbsp Here A B C displaystyle A B C nbsp has a truncation error equal to 1 This truncation error occurs because computers do not store the least significant digits of an extremely large integer See also editQuantization errorReferences edit Atkinson Kendall E 1989 An Introduction to Numerical Analysis 2nd ed New York Wiley p 20 ISBN 978 0 471 62489 9 OCLC 803318878 Stoer Josef Bulirsch Roland 2002 Introduction to Numerical Analysis 3rd ed Princeton N J Recording for the Blind amp Dyslexic OCLC 50556273 retrieved 2022 02 08 Atkinson Kendall E 1989 An Introduction to Numerical Analysis 2nd ed New York John Wiley amp Sons p 20 ISBN 978 0 471 50023 0 Stoer Josef Bulirsch Roland 2002 Introduction to Numerical Analysis 3rd ed Berlin New York Springer Verlag p 1 ISBN 978 0 387 95452 3 Retrieved from https en wikipedia org w index php title Truncation error amp oldid 1176112131, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.