HOME

TheInfoList



OR:

In
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
and
scientific computing Computational science, also known as scientific computing or scientific computation (SC), is a field in mathematics that uses advanced computing capabilities to understand and solve complex problems. It is an area of science that spans many disc ...
, truncation error is an error caused by approximating a mathematical process.


Examples


Infinite series

A summation series for e^x is given by an infinite series such as e^x=1+ x+ \frac + \frac+ \frac+ \cdots 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 e^x\approx 1+x+ \frac In this case, the truncation error is \frac+\frac+ \cdots Example A: Given the following infinite series, find the truncation error for if only the first three terms of the series are used. S = 1 + x + x^2 + x^3 + \cdots, \qquad \left, x\<1. Solution Using only first three terms of the series gives \begin S_3 &= \left(1+x+x^2\right)_ \\ & = 1+0.75+\left(0.75\right)^2 \\ &= 2.3125 \end The sum of an infinite geometrical series S = a + ar + ar^2 + ar^3 + \cdots,\ r<1 is given by S = \frac For our series, and , to give S=\frac=4 The truncation error hence is \mathrm = 4 - 2.3125 = 1.6875


Differentiation

The definition of the exact first derivative of the function is given by f'(x) = \lim_ \frac However, if we are calculating the derivative numerically, h has to be finite. The error caused by choosing h 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)=5x^3 at x=7 using a step size of h=0.25 Solution: The first derivative of f(x)=5x^3 is f'(x) = 15x^2, and at x=7, f'(7) = 735. The approximate value is given by f'(7) = \frac = 761.5625 The truncation error hence is \mathrm = 735 - 761.5625 = -26.5625


Integration

The definition of the exact integral of a function f(x) from a to b is given as follows. Let f: ,b\to \Reals be a function defined on a
closed interval In mathematics, a (real) interval is a set of real numbers that contains all real numbers lying between any two numbers of the set. For example, the set of numbers satisfying is an interval which contains , , and all numbers in between. Other ...
,b/math> of the real numbers, \Reals, and P = \left \, be a
partition Partition may refer to: Computing Hardware * Disk partitioning, the division of a hard disk drive * Memory partition, a subdivision of a computer's memory, usually for use by a single job Software * Partition (database), the division of a ...
of ''I'', where a = x_0 < x_1 < x_2 < \cdots < x_n = b. \int_^b f(x) \, dx = \sum_^ f(x_i^*)\, \Delta x_i where \Delta x_i = x_i - x_ and x_i^* \in
_, x_i The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline ...
/math>. 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 \int_^x^ find the truncation error if a two-segment left-hand
Riemann sum In mathematics, a Riemann sum is a certain kind of approximation of an integral by a finite sum. It is named after nineteenth century German mathematician Bernhard Riemann. One very common application is approximating the area of functions or lin ...
is used with equal width of segments. Solution We have the exact value as \begin \int_^ &= \left \frac \right^ \\ & = \left \frac \right\\ & = 234 \end Using two rectangles of equal width to approximate the area (see Figure 2) under the curve, the approximate value of the integral \begin \int_3^9 x^2 \, dx &\approx \left. \left(x^2\right) \_(6 - 3) + \left. \left(x^2\right) \_(9 - 6) \\ & = (3^2)3 + (6^2)3 \\ &= 27 + 108 \\ &= 135 \end \begin \text &= \text - \text \\ &= 234 - 135 \\ &= 99. \end Occasionally, by mistake,
round-off error A roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are d ...
(the consequence of using finite precision
floating point numbers In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be r ...
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

Truncation error can cause (A+B)+C \neq A+(B+C) within a computer when A = -10^, B = 10^, C = 1 because (A+B)+C = (0)+C = 1 (like it should), while A+(B+C) = A+(B)=0. Here, A+(B+C) 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

*
Quantization error Quantization, in mathematics and digital signal processing, is the process of mapping input values from a large set (often a continuous set) to output values in a (countable) smaller set, often with a finite number of elements. Rounding and ...


References

* * {{Citation , last1=Stoer , first1=Josef , last2=Bulirsch , first2=Roland , title=Introduction to Numerical Analysis , publisher=
Springer-Verlag Springer Science+Business Media, commonly known as Springer, is a German multinational publishing company of books, e-books and peer-reviewed journals in science, humanities, technical and medical (STM) publishing. Originally founded in 1842 in ...
, location=Berlin, New York , edition=3rd , isbn=978-0-387-95452-3 , year=2002 , page=1 , url=https://books.google.com/books?id=1oDXWLb9qEkC&pg=PA1. Numerical analysis