Professional Documents
Culture Documents
Lecture_22_to_24_171093041042445890665fab9eabb603 (2)
Lecture_22_to_24_171093041042445890665fab9eabb603 (2)
Lecture_22_to_24_171093041042445890665fab9eabb603 (2)
Numerical Differentiation
Forward Difference Approximation of the First Derivative
Taylor Series Approximation
f 00 (x)(∆x)2 f 000 (x)(∆x)3
f (x + ∆x) = f (x) + f 0 (x)∆x + + + ··· (1)
2! 3!
On rearranging some terms in Eq.(1)
f (x + ∆x) − f (x)
= f 0 (x) + O(∆x) (3)
∆x
On truncating the term in Eq.(3) after first derivative gives,
f (x + ∆x) − f (x)
f 0 (x) ≈ (4)
∆x
2 / 15
Backward Difference Approximation of the First Derivative
Taylor Series Approximation
f 00 (x)(∆x)2 f 000 (x)(∆x)3
f (x − ∆x) = f (x) − f 0 (x)∆x + − + ··· (5)
2! 3!
Rearranging Eq.(5)
f (x) − f (x − ∆x)
= f 0 (x) + O(∆x) (7)
∆x
On truncating the term in Eq.(7) after first derivative gives,
f (x) − f (x − ∆x)
f 0 (x) ≈ (8)
∆x
3 / 15
Graphical Representation
4 / 15
Figure 2: Graphical representation of backward difference approximation of
first order derivative.
5 / 15
Centered Difference Approximation of the First Derivative
f (x + ∆x) − f (x − ∆x)
= f 0 (x) + O(∆x 2 ) (11)
2∆x
On truncating the term in Eq.(11) after first derivative gives,
f (x + ∆x) − f (x − ∆x)
f 0 (x) ≈ (12)
2∆x
6 / 15
Figure 3: Graphical representation of centered difference approximation of
first order derivative.
7 / 15
Finite Difference Approximations of Higher Derivatives
f 00 (x)(2∆x)2
f (x + 2∆x) = f (x) + f 0 (x)(2∆x) + + ··· (13)
2!
Similarly, the Taylor series expansion for f (x + ∆x) is given by,
f 00 (x)(∆x)2
f (x + ∆x) = f (x) + f 0 (x)∆x + + ··· (14)
2!
Multiply Eq.(14) by 2 and then subtract it from Eq.(13) gives,
f 00 (x)(2∆x 2 )
f (x + 2∆x) − 2f (x + ∆x) = −f (x) + + ··· (15)
2!
11 / 15
Eq.(15) can also be written as,
12 / 15
Similarly, second-order central difference approximation can be repre-
sented as,
f (x+∆x)−f (x)
− f (x)−f∆x
(x−∆x)
f 00 (x) ≈ ∆x
(20)
∆x
13 / 15