Numerical Integration Using Simpson 1/3 Method Algorithm
In numerical analysis, Simpson's 1/3 rule (method) is a technique for approximating definite integral.
This method is based on Newton's Cote Quadrature Formula and Simpson 1/3 rule is obtained when we put value of n = 2 in this formula.
In this article, we are going to develop an algorithm for Simpson 1/3 Rule.
Simpson's 1/3 Rule Algorithm
1. Start 2. Define function f(x) 3. Read lower limit of integration, upper limit of integration and number of sub interval 4. Calcultae: step size = (upper limit - lower limit)/number of sub interval 5. Set: integration value = f(lower limit) + f(upper limit) 6. Set: i = 1 7. If i > number of sub interval then goto 8. Calculate: k = lower limit + i * h 9. If i mod 2 =0 then Integration value = Integration Value + 2* f(k) Otherwise Integration Value = Integration Value + 4 * f(k) End If 10. Increment i by 1 i.e. i = i+1 and go to step 7 11. Calculate: Integration value = Integration value * step size/3 12. Display Integration value as required answer 13. Stop
Recommended Readings
- Numerical Integration Trapezoidal Method Algorithm
- Numerical Integration Using Trapezoidal Method Pseudocode
- Numerical Integration Using Trapezoidal Method C Program
- Trapezoidal Rule Using C++ with Output
- Numerical Integration Using Simpson 1/3 Method Algorithm
- Numerical Integration Using Simpson 1/3 Method Pseudocode
- Numerical Integration Using Simpson 1/3 Method C Program
- Simpson 1/3 Rule Using C++ with Output
- Numerical Integration Using Simpson 3/8 Method Algorithm
- Numerical Integration Using Simpson 3/8 Method Pseudocode
- Numerical Integration Using Simpson 3/8 Method C Program
- Simpson 3/8 Rule Using C++ with Output