What it does
An antiderivative F(x) is a function whose derivative is f(x). A definite integral from a to b is the signed area under f between those limits. This calculator gives both. It finds the antiderivative by the same rules you'd use by hand, and it always computes the definite integral numerically too, so you get an answer even when no formula exists.
How it's calculated
∫ from a to b of f(x) dx = F(b) − F(a)
For the antiderivative, the calculator splits sums, pulls out constants and then tries the table of integrals, linear substitution (u = ax + b), u-substitution, integration by parts for forms like x·eˣ and ln x, and the inverse-trig forms. It then checks its answer by differentiating it numerically at several points. If that check fails, it won't show the formula.
For the number, it uses adaptive Simpson's rule: it keeps halving any piece where two estimates disagree. Simpson's error bound shrinks with 1/n⁴, so halving the step cuts the error about 16-fold, and the leftover error is estimated from the difference. Where f blows up at a point or a limit is infinite, it switches to a method that never evaluates the bad point (tanh-sinh quadrature) and checks whether the answer actually settles. If it doesn't, you're told the integral diverges.
Worked example: u-substitution
Evaluate ∫ from 0 to 1 of x²(1 + 2x³)⁵ dx.
- Let u = 1 + 2x³. Then du = 6x² dx, so x² dx = du/6.
- Change the limits: x = 0 gives u = 1, and x = 1 gives u = 3.
- The integral becomes (1/6)∫ from 1 to 3 of u⁵ du = (1/36)(3⁶ − 1⁶) = 728/36 = 182/9 ≈ 20.2222.
The calculator spots substitutions like this one by checking whether the rest of the integrand is a constant times the derivative of the inside.
Table of common integrals
| f(x) | ∫ f(x) dx (add + C) |
|---|---|
| xⁿ (n ≠ −1) | xⁿ⁺¹/(n + 1) |
| 1/x | ln|x| |
| eˣ | eˣ |
| aˣ | aˣ/ln a |
| sin x | −cos x |
| cos x | sin x |
| sec²x | tan x |
| csc²x | −cot x |
| sec x tan x | sec x |
| csc x cot x | −csc x |
| tan x | ln|sec x| |
| cot x | ln|sin x| |
| sec x | ln|sec x + tan x| |
| csc x | ln|csc x − cot x| |
| 1/√(a² − x²) | arcsin(x/a) |
| 1/(a² + x²) | (1/a) arctan(x/a) |
| 1/(x√(x² − a²)) | (1/a) arcsec(x/a) |
The integral of sec x is the one most people forget: ∫ sec x dx = ln|sec x + tan x| + C. And ∫ sin x dx = −cos x + C, so ∫ from 0 to π of sin x dx = −cos π + cos 0 = 2.
Trig substitution
Integrals with these square roots are usually done with a trigonometric substitution. The calculator handles the arcsin and arctan forms directly; for the rest it gives the numerical value.
| Expression | Substitute | Identity used | Range of θ |
|---|---|---|---|
| √(a² − x²) | x = a sin θ | 1 − sin²θ = cos²θ | −π/2 ≤ θ ≤ π/2 |
| √(a² + x²) | x = a tan θ | 1 + tan²θ = sec²θ | −π/2 < θ < π/2 |
| √(x² − a²) | x = a sec θ | sec²θ − 1 = tan²θ | 0 ≤ θ < π/2 or π/2 < θ ≤ π |
Limitations
- Many functions, such as e^(x²) and sin(x)/x, have no antiderivative made of elementary functions. The calculator says so and still gives the definite integral numerically.
- Repeated integration by parts beyond polynomials times eˣ, sin x or cos x, partial fractions beyond simple quadratics, and full trig substitution aren't automated.
- F(b) − F(a) only works when F is continuous on [a, b]. For 1/x from −1 to 1 it gives a meaningless 0; this calculator detects the blow-up and reports that the integral diverges.
- Very wiggly functions can need more evaluations than the calculator allows. It tells you when the error target wasn't reached.
Sources
- OpenStax Calculus Volume 2, Appendix A: Table of integrals
- OpenStax Calculus Volume 1, 5.5: Substitution
- OpenStax Calculus Volume 2, 3.2: Trigonometric integrals
- OpenStax Calculus Volume 2, 3.3: Trigonometric substitution
- OpenStax Calculus Volume 2, 3.6: Numerical integration (Simpson's rule error bound)
- NIST Digital Library of Mathematical Functions, §3.5: Quadrature
Learn: Integration by parts · Fundamental theorem of calculus