Integral Calculator
Enter an expression in x (or any variable) and the calculator returns either a symbolic antiderivative or a numerical value over a given interval. Handles polynomials, trigonometric, exponential, logarithmic and rational functions, along with common substitutions and integration by parts — with the steps shown if you need to check your working.
How to evaluate an integral
-
1
Type the integrand
Write the function like `x^2 + 3*sin(x)` or `1 / (x^2 + 1)`. Implicit multiplication with spaces is accepted.
-
2
Choose definite or indefinite
For a definite integral, set the lower and upper bounds (supports `inf` and `-inf`).
-
3
Compute
The tool attempts a symbolic solution first; if that fails, it falls back to numerical quadrature.
-
4
Read the steps
Optional step-by-step expansion shows the substitution, integration-by-parts or partial-fraction decomposition.
Common antiderivatives
| f(x) | Integral |
|---|---|
| x^n (n != -1) | x^(n+1) / (n+1) + C |
| 1/x | ln|x| + C |
| e^x | e^x + C |
| sin(x) | -cos(x) + C |
| cos(x) | sin(x) + C |
| sec^2(x) | tan(x) + C |
| 1 / (x^2 + 1) | arctan(x) + C |
| 1 / sqrt(1 - x^2) | arcsin(x) + C |
Techniques the tool tries, in order
- Basic rules — power, exponential, trig.
- Substitution (u-sub) — spot a function and its derivative in the integrand.
- Integration by parts —
∫u dv = uv - ∫v du, for products of different function types. - Partial fractions — for rational integrands
P(x)/Q(x)withdeg(P) < deg(Q). - Trigonometric identities — for products of sines and cosines.
- Numerical quadrature — Gauss-Kronrod for definite integrals when no closed form exists.
Definite integral notation
∫_a^b f(x) dx = F(b) - F(a)
The fundamental theorem says: if F is an antiderivative of f, the definite integral from a to b equals F(b) - F(a). The tool computes F first, then evaluates at the bounds.
Common mistakes
- Dropping the
+ C. Every indefinite integral has a constant of integration. The tool prints it; students writing by hand often forget. - Wrong bounds on improper integrals.
∫_0^∞ e^(-x) dx = 1, but∫_(-∞)^∞ e^(-x^2) dx = sqrt(π). Always check convergence. - Using arctan instead of arctanh when the denominator factors as
(x-a)(x-b)with real roots — that is a log, not an arctan. - Forgetting the chain rule in u-substitution. If
u = 3x, thendu = 3 dx, notdu = dx.
When there is no closed form
Some integrals simply have no elementary antiderivative — e^(-x^2), sin(x)/x, 1/ln(x). Over a specific interval they still have a numerical value, which the tool computes with high precision.
Frequently Asked Questions
For a definite integral, the tool falls back to numerical quadrature (Gauss-Kronrod) and returns a value with an error estimate. For an indefinite integral with no elementary antiderivative, it reports this and offers a series expansion as an alternative.
Yes. Wrap the expression to clarify the variable, e.g. integrate(t^2, t). Any single-letter variable works.
Yes. Toggle “show steps” and the tool prints the substitution, by-parts choice or partial-fraction decomposition it used, one line at a time.
Yes, but you may need to split the interval at the zero crossings for a clean answer. The tool handles \|x\| by detecting the signs automatically when possible.