In numerical analysis and scientific computing, truncation error is an error caused by approximating a mathematical process. The term truncation comes from the fact that these simplifications often involve the truncation of an infinite series expansion so as to make the computation possible and practical.
Examples
Infinite series A summation series for e x {\displaystyle e^{x}} is given by an infinite series such as
e 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 }
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 ≈ 1 + x + x 2 2 ! {\displaystyle e^{x}\approx 1+x+{\frac {x^{2}}{2!}}}
In this case, the truncation error is x 3 3 ! + x 4 4 ! + ⋯ {\displaystyle {\frac {x^{3}}{3!}}+{\frac {x^{4}}{4!}}+\cdots }
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 | < 1. {\displaystyle S=1+x+x^{2}+x^{3}+\cdots ,\qquad \left|x\right|<1.}
Solution Using only first three terms of the series gives
S 3 = ( 1 + x + x 2 ) x = 0.75 = 1 + 0.75 + ( 0.75 ) 2 = 2.3125 {\displaystyle {\begin{aligned}S_{3}&=\left(1+x+x^{2}\right)_{x=0.75}\\&=1+0.75+\left(0.75\right)^{2}\\&=2.3125\end{aligned}}}
The sum of an infinite geometrical series
S = a + a r + a r 2 + a r 3 + ⋯ , r < 1 {\displaystyle S=a+ar+ar^{2}+ar^{3}+\cdots ,\ r<1} is given by
S = a 1 − r {\displaystyle S={\frac {a}{1-r}}} For our series, a = 1 and r = 0.75, to give
S = 1 1 − 0.75 = 4 {\displaystyle S={\frac {1}{1-0.75}}=4} The truncation error hence is
T E = 4 − 2.3125 = 1.6875 {\displaystyle \mathrm {TE} =4-2.3125=1.6875}
Differentiation The definition of the exact first derivative of the function is given by
f ′ ( x ) = lim h → 0 f ( x + h ) − f ( x ) h {\displaystyle f'(x)=\lim _{h\to 0}{\frac {f(x+h)-f(x)}{h}}}
… excerpt ends here. Continue reading the full article.
