Professional Documents
Culture Documents
ME 261 (Lecture-4, Numerical Differentiation)
ME 261 (Lecture-4, Numerical Differentiation)
Numerical Analysis
Lecture-3:
Numerical Differentiation
--------(1)
Note that because the Eq. (1) is an infinite series, A remainder term is included to
account for all terms from n + 1 to infinity:
--------------------------------------(2)
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. It is
often convenient to simplify the Taylor series by defining a step size, h = xi+1 − xi
and expressing the Eq. (1) as
------(3)
----------------------------------------------------(4)
where the nomenclature O(hn+1) means that the truncation error is of the order of hn+1
That is, the error is proportional to the step size h raised to the (n + l)th power.
Although this approximation implies nothing regarding the magnitude of the
derivatives that multiply hn+1, it is extremely useful in judging the comparative error
of numerical methods based on Taylor series expansions.
For example, if the error is O(h), halving the step size will halve the error. On the
other hand, if the error is O(h2), halving the step size will quarter the error.
f ( ) 2 R f ( )
Similarly, R1 h , 1 h O ( h)
2! h 2!
Thus, if h is chosen to be sufficiently small, f ( x) can be approximated by
f ( xi ) f ( xi 1 )
f ( xi ) Backward Difference Approximation (9)
h
f ( )
with a trancation error: Et (h) h O ( h)
2!
Eq. (9) is also called Backward difference quotient or, two - point formula.
The trancation error is also in the order of h and can be decreased by decreasing h.
ME 261: Numerical Analysis Md. Masudur Rahman
Lecture-3: Numerical Differentiation 7
Central Difference Approximation of the First Derivative
Forward expansion of Taylor series:
f ( xi ) 2 f (3) ( xi ) 3
f ( xi 1 ) f ( xi ) f ( xi )h h h ......................................(10)
2! 3!
Backward expansion of Taylor series:
f ( xi ) 2 f (3) ( xi ) 3
f ( xi 1 ) f ( xi ) f ( xi )h h h .......................................(11)
2! 3!
Now, subtracting Eq. (11) from Eq. (10) we get,
2 f (3) ( xi ) 3
f ( xi 1 ) f ( xi 1 ) 2 f ( xi )h h
3!
f ( xi 1 ) f ( xi 1 ) f (3) ( xi ) 2
f ( xi ) h ........................................................(12)
2h 3!
f ( xi 1 ) f ( xi 1 )
f ( xi ) O(h 2 ) Central Difference Approximation ...............(13)
2h
Eq. (13) is also called Central difference quotient or, two - point formula.
Notice that the truncation error is of the order of h 2 in contrast to the forward and
backward approximations that were of the order of h. Consequently, the Taylor series
analysis yields the practical information that the centered difference is a more accurate
representation of the derivative.