Numerical Integration Calculator
Enter f(x), integration bounds and a subinterval count to approximate a definite integral with three common quadrature methods. Comparing the outputs provides a quick convergence and consistency check.
How this tool works
The tool evaluates the composite trapezoidal rule, composite Simpson 1/3 rule and composite four-point Gauss–Legendre quadrature. Simpson automatically uses an even number of subintervals.
Example
Integrate sin(x) from 0 to π. The exact value is 2, so the differences between the three numerical estimates immediately show their accuracy for the chosen resolution.
Common questions
Which integration method is most accurate?
There is no universal winner. Accuracy depends on smoothness and resolution. High-order Gaussian quadrature is excellent for smooth integrands, while discontinuities or singularities require special care.
Can I enter an improper integral?
Not directly. The current tool expects finite bounds and finite function values throughout the interval.