Simpson's Rule

 In the trapezoidal rule, the function is approximated by a simple straight line between each intervals. If higher order polynomials are used, the more accurate result can be achieved. For example, in Simpson’s 1/3 rule, a second order polynomial is used for integration of each segments. Assume the integration of function f(x) as follows:

 

 The function f(x) can be approximated by a second order polynomial as follows:

 

where

 

Now, the area under f(x) can be approximated as follows:

 

 where

 

 Extending this method, the Simpson’s 1/3 rule can be written by using multiple points.

 

 
 
Numerical Integration                                                        
      (Source Code in C++)                                                         

o        Simpson's Rule                                                                                                    

o        Trapezoidal Rule                                                                                                
                  
 
 

Comments