Calculate definite integrals for any function with step-by-step solutions. Visualize area under curves and understand fundamental calculus concepts.
The definite integral ∫ₐᵇ f(x) dx represents the signed area between the curve y = f(x) and the x‑axis, from x = a to x = b. It is defined as the limit of Riemann sums and is computed via the Fundamental Theorem of Calculus: if F'(x) = f(x), then ∫ₐᵇ f(x) dx = F(b) − F(a).
\[ \int_{a}^{b} f(x)\,dx = \lim_{n\to\infty} \sum_{i=1}^{n} f(x_i^*)\,\Delta x = F(b)-F(a) \]
This calculator gives you both the exact symbolic value (when an elementary antiderivative exists) and a high‑precision numeric approximation. The graph highlights the region whose area is being computed.
| f(x) | ∫ₐᵇ f(x) dx | Example (a,b) |
|---|---|---|
| xⁿ (n≠-1) | (bⁿ⁺¹−aⁿ⁺¹)/(n+1) | ∫₀¹ x² = 1/3 |
| 1/x | ln|b/a| | ∫₁² 1/x = ln2 |
| eˣ | eᵇ − eᵃ | ∫₀¹ eˣ = e − 1 |
| sin(x) | cos(a) − cos(b) | ∫₀^π sin(x) = 2 |
| cos(x) | sin(b) − sin(a) | ∫₀^π/2 cos(x) = 1 |
| 1/(1+x²) | arctan(b)−arctan(a) | ∫₀¹ 1/(1+x²) = π/4 |
∫₀² 3x² dx
3*x^2, lower limit 0, upper limit 2.
Some functions like e⁻ˣ² (Gaussian), sin(x²), or sin(x)/x have no elementary antiderivative. In such cases the calculator uses an adaptive Simpson method, accurate to about 1e-12 relative error. You will see a note that the result is numerical.
When no elementary antiderivative exists, the calculator uses an adaptive Simpson's rule. This method recursively subdivides the interval until the estimated error falls below 1e-12. The algorithm is based on Simpson's 1/3 rule:
∫ₐᵇ f(x) dx ≈ (b−a)/6 · [f(a) + 4f((a+b)/2) + f(b)]
Adaptive refinement ensures high accuracy for smooth functions like e⁻ˣ², sin(x²), or sin(x)/x. Maximum recursion depth is 20, guaranteeing termination even for oscillatory integrands.
Reference: Press et al., Numerical Recipes (3rd ed.), Cambridge University Press.