Lecture - 3
Lecture - 3
Lecture – 3
Truncation Errors and the Taylor Series
By; Dawit K.
Department of Mechanical Engineering
Jimma Institute of Technology
is an infinite series, an equal sign replaces the approximate sign that was
used in Eqs. (4.2) through (4.4).
A remainder term is included to account for all terms from n + 1 to
infinity:
where
the subscript n connotes that this is the remainder for the nth-order
approximation and
ξ is a value of x that lies somewhere between xi and xi+1.
5. the complete simplified Taylor series
Is obtained by defining a step size h = xi+1 − xi
Expressed as:
Example
Use zero- through fourth-order Taylor series expansions to approximate
the function
from xi = 0 with h = 1. That is, predict the function’s value at xi+1 = 1.
Solution.
Because we are dealing with a known function, we can compute values
for f (x) between 0 and 1.
The results (Fig. 3.1) indicate that the function starts at f (0) = 1.2 and
then curves downward to f (1) = 0.2.
Thus, the true value that we are trying to predict is 0.2.
zero-
zero-order approximation
The Taylor series approximation with n = 0 is f(xi+1) ~= 1.2
Thus, as in Fig. 3.1, the zero-order approximation is a constant.
Using this formulation results in a truncation error of Et = 0.2 − 1.2 =−1.0
at x = 1.
firs-
firs-order approximation
For n = 1, the first derivative must be determined and evaluated at x = 0:
FIGURE 3.1
The approximation of f (x) =−0.1x4 − 0.15x3 − 0.5x2 − 0.25x + 1.2 at x =1 by zero-order,
first-order, and second-order Taylor series expansions.
Therefore, the first-order approximation is:
Therefore
Now let us truncate the series after the first derivative term:
Thus, the first part of Eqn. has a truncation error of order ti+1 − ti.
ti.
In other words, the error of our derivative approximation should be
proportional to the step size.
Consequently, if we halve the step size, we would expect to halve the
error of the derivative.
Example: The Effect of Nonlinearity and FIGURE 3.4
Plot of the function f (x) = xm
Step Size on the Taylor Series
for m = 1, 2, 3, and 4.
Approximation
Given the plot of the function f(x) = xm
for m = 1, 2, 3, and 4 over the range from
x = 1 to 2. for m = 1 the function is linear,
and as m increases, more curvature or
nonlinearity is introduced into the
function.
Employ the first-order Taylor series to
approximate this function for various
values of the exponent m and the step
size h.
The given function can be approximated by a first-order Taylor series
expansion, as in