Numerical Differentiation

Numerical differentiation of a continuous function can be determined by using the Taylor series. The forward Taylor series expansion of function f(x) can be written as follows:

 

(Eq.1)

 

The backward Taylor series expansion of function f(x) can be represented as follows:

 

 (Eq. 2)

 he forward difference approximation of the first derivative of the function f(x) can be obtained from Eq. 1.

 

The backward difference approximation of the first derivative of the function f(x) can be obtained from Eq. 2.

 

Subtracting Eq.1 from Eq.2, the centered difference approximation of the first derivative of the function f(x) having higher order accuracy can be written as follows:

 

The second derivative of the function f(x) can be found by adding Eq.1 to Eq. 2:

 

 Using the Taylor series, the higher order derivative of the function f(x) with desired order of accuracy can be found.

 
 
 
 
Numerical Differentiation                                                 
        (Source Code in C++)                                                    
                            
 

Comments