Integral Calculator
Compute definite integrals of common functions using numerical integration. This calculator uses Simpson's 1/3 rule to approximate the area under a curve between two bounds, and provides an error estimate so you know how accurate the result is.
Integration finds the total accumulated value of a function over an interval. Geometrically, a definite integral represents the signed area between a curve and the x-axis from point a to point b.
How Simpson's Rule Works:
Simpson's 1/3 rule approximates the integral by fitting parabolas through consecutive groups of three points along the curve, then summing the areas under those parabolas. It is significantly more accurate than the trapezoidal rule for smooth functions.
The formula splits the interval [a, b] into n equal subintervals (n must be even), then computes:
∫f(x)dx ≈ (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + 4f(x₃) + ... + f(xₙ)]
where h = (b - a)/n.
Supported Function Types:
- Polynomial (ax^n + bx + c): Works with any real exponent. For example, integrating x^2 from 0 to 1 gives 1/3.
- Trigonometric (a·sin(bx), a·cos(bx), a·tan(bx)): Useful for wave and oscillation problems. Integrating sin(x) from 0 to π gives exactly 2.
- Exponential (a·e^(bx)): Models growth and decay. Integrating e^x from 0 to 1 gives e - 1 ≈ 1.71828.
- Logarithmic (a·ln(bx)): Make sure bx stays positive over the entire interval, since ln is only defined for positive arguments.
Error Estimation:
The calculator runs Simpson's rule twice, once with your chosen number of intervals and once with half as many. The difference between those two results gives a practical estimate of the approximation error. Increasing the number of intervals generally reduces the error.