Calculus

Integral Calculator

Compute definite integrals numerically using Simpson's rule

Last reviewed: How we build & verify

How it works

An integral accumulates a quantity across an interval. The definite form gives the signed area between a curve and the x-axis; the indefinite form gives the whole family of antiderivatives. Definite results here come from Simpson rule, which fits a parabola through each pair of sub-intervals rather than a straight line.

Formula
∫ₐᵇ f(x) dx = F(b) − F(a),  where F′ = f
Power rule: ∫ xⁿ dx = x^(n+1)/(n+1) + C,  for n ≠ −1
Simpson: ∫ₐᵇ f(x) dx ≈ (h/3)[f(x₀) + 4f(x₁) + 2f(x₂) + … + 4f(xₙ₋₁) + f(xₙ)],  h = (b − a)/n
Variables
  • a, blower and upper limits of integration
  • Fany antiderivative of f
  • Cconstant of integration, present only in the indefinite form
  • nnumber of Simpson sub-intervals, which must be even
  • hwidth of each sub-interval
Worked example
Inputs: ∫₀² x³ dx
  1. Antiderivative: F(x) = x⁴/4
  2. F(2) − F(0) = 16/4 − 0 = 4
  3. Simpson with n = 2 and h = 1: (1/3)[f(0) + 4f(1) + f(2)]
  4. (1/3)[0 + 4(1) + 8] = 12/3 = 4
Result: 4, and Simpson rule lands on it exactly
Notes
  • Simpson rule integrates any polynomial up to degree three without error, which is why two sub-intervals already give the exact answer above. Its error term carries a fourth derivative, so it only begins to drift on functions that curve more sharply than a cubic.
  • What you get is signed area. ∫₀^2π sin x dx is zero because the lobes cancel; for physical area, integrate |f(x)| or split the interval at every root first.
  • Quadrature rules break on integrands that blow up inside the interval. ∫₀¹ x^(−1/2) dx converges to 2 analytically, but sampling at x = 0 returns infinity, so improper integrals need a substitution or a limit rather than more sub-intervals.

Most Searched Today

Frequently Asked Questions

Integral Calculator runs right in the browser tab you already have open. No install, no account, no cost.

Integral Calculator follows the standard method used in textbooks and technical references for this calculation, and we show the formula or approach on the page itself so you can check the working rather than trust a black box. Found an edge case that breaks it? Use the feedback button in the bottom-right corner.

Integral Calculator | ExaCalc