Integral Calculator
Enter any function of x to get its symbolic antiderivative. The calculator combines linearity, the power rule, a table of standard antiderivatives, linear u-substitution and integration by parts. Provide both limits a and b to also evaluate the definite integral.
Symbolic where possible, and honest where not
Differentiation is mechanical: every expression has a derivative and a fixed set of rules finds it. Integration is not. No procedure always works, many ordinary functions have no antiderivative in elementary terms, and the practical skill is recognising which technique an integrand invites.
This calculator implements that recognition for the standard techniques. It returns a symbolic antiderivative where its rules reach, evaluates a definite integral when both limits are given, and says plainly when the integrand is beyond it.
The output is an expression, not a number — an antiderivative valid for every x, which is what an algebra question asks for and what you need when the integral is one step in a longer argument.
The rules implemented are finite, and the tool does not pretend otherwise. When no rule matches, it reports that rather than returning an approximation, and points to the numeric definite-integral tool, which will produce a figure for any integrand at all.
How to use this calculator
- Enter the integrand as a function of x Standard notation with ^ for powers and named functions written with brackets. Multiplication is best written explicitly with an asterisk.
- Leave both limits blank for an indefinite integral The answer then comes back as an expression with + C. This is the mode to use when the antiderivative itself is what is wanted.
- Fill in both limits for a definite integral Both a and b are needed; supplying only one leaves the tool in indefinite mode. The two evaluations and their difference are shown as separate lines.
- Read the intermediate line before the final one The result immediately after the rules are applied is shown before simplification. It is the form closest to hand-working, and the best place to compare against your own steps.
The formula, and where it comes from
∫xⁿ dx = xⁿ⁺¹/(n+1) + C (n ≠ −1) ∫x⁻¹ dx = ln|x| + C ∫ₐᵇ f(x) dx = F(b) − F(a)
The reverse power rule is the workhorse: raise the exponent by one and divide by the new exponent. It is exactly the power rule for derivatives read backwards, and checking an answer by differentiating it is the fastest verification there is.
An exponent of minus one is the one case the power rule cannot handle, since it would divide by zero. The natural logarithm fills that gap, and the absolute value inside it matters: it makes the antiderivative valid on both sides of the origin.
The constant of integration is not decoration. Differentiation destroys constants, so every function has infinitely many antiderivatives differing by one, and the + C records that family.
For a definite integral the fundamental theorem replaces all of that with a subtraction: find any antiderivative, evaluate it at both limits, subtract. The constant cancels between the two evaluations, which is why it never appears in a definite answer.
What each input means
- f(x) Integrand — form field “Function f(x)”
- The expression to integrate, in x. Its structure decides which rule is tried, so brackets and the arrangement of factors matter.
- a Lower limit — form field “Lower limit a (optional)”
- Optional. A finite number; leave blank together with b for the indefinite integral.
- b Upper limit — form field “Upper limit b (optional)”
- Optional, and only used when a is given too. Swapping the two limits negates the result.
- F(x) Antiderivative
- The returned expression, whose derivative is the integrand. Differentiating it is a complete check on the answer.
Worked examples
Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.
A product that needs integration by parts
Integrate x·sin(x). Neither factor integrates the other away, so this is the pattern by parts exists for: a polynomial multiplied by a trigonometric function.
Inputs Function f(x) = x * sin(x), Lower limit a (optional) = , Upper limit b (optional) =
- Integrand f(x) = sin(x)·x
- Apply integration rules x·−cos(x) − −sin(x)
- Antiderivative F(x) = −cos(x)·x + sin(x)
Result ∫ f(x) dx = −cos(x)·x + sin(x) + C
The polynomial is differentiated and the trigonometric factor integrated, which is the choice that makes progress: differentiating x reduces it to a constant, so the remaining integral is simpler than the one we started with.
The answer contains both a sine and a cosine term. Differentiating it by the product rule returns the integrand, which is worth doing once to see how by parts and the product rule are the same statement read in opposite directions.
A linear substitution
Integrate exp(2x + 1). The exponential's argument is linear in x, which is the case handled without a full substitution.
Inputs Function f(x) = exp(2x + 1), Lower limit a (optional) = , Upper limit b (optional) =
- Integrand f(x) = exp(2·x + 1)
- Apply integration rules exp(2·x + 1)/2
- Antiderivative F(x) = exp(2·x + 1)/2
Result ∫ f(x) dx = exp(2·x + 1)/2 + C
The result is the same exponential divided by 2 — the coefficient of x inside the argument. That division is the entire content of a linear substitution, and omitting it is the most common error with this shape.
The same correction applies to every named function with a linear argument: integrate as though the argument were x alone, then divide by its slope. Nothing more elaborate is needed while the inner expression stays linear.
A definite integral of a polynomial
Integrate x² from 0 to 3. Both limits are supplied, so the fundamental theorem is applied after the antiderivative is found.
Inputs Function f(x) = x^2, Lower limit a (optional) = 0, Upper limit b (optional) = 3
- Integrand f(x) = x²
- Apply integration rules x³/3
- Antiderivative F(x) = x³/3
- Evaluate F(b) F(3) = 9
- Evaluate F(a) F(0) = 0
- Definite integral F(b) − F(a) = 9
Result ∫ from 0 to 3 = 9
The antiderivative comes from the reverse power rule, then the two evaluations are reported separately before their difference. Seeing F(b) and F(a) on their own lines is what makes a sign error in the subtraction obvious.
The constant of integration is absent from the answer, and would make no difference to it: adding the same constant to both evaluations cancels it in the subtraction.
Reading the result
Verify by differentiating
An antiderivative is correct exactly when its derivative is the integrand, and that check is mechanical where the integration was not. Any answer that differs from yours can be settled this way without re-integrating.
What a refusal means
That no implemented rule matched — not that no antiderivative exists. Sometimes both are true, as for exp(−x²), which has no elementary antiderivative at all. Either way the numeric tool will give a figure for a definite integral.
When you would use this
Checking integration homework
The line showing the result before simplification usually reveals which technique was expected, so a disagreement can be traced to the choice of method rather than only to the arithmetic.
Recovering a quantity from its rate
Position from velocity, total cost from marginal cost, accumulated charge from current: each integrates a rate. The symbolic answer gives the whole function, not a value at one instant.
Assumptions and limitations
What this calculator assumes
- The integrand is a function of x alone, and integration is with respect to x.
- A definite integral requires both limits to be finite numbers; a single limit is ignored.
- The reported antiderivative is exact, not approximate.
Where it stops being the right tool
- The rule set is finite: linearity, the reverse power rule, a standard table, linear substitution, substitution where the integrand contains an inner derivative, partial fractions with a quadratic denominator, and integration by parts for the common patterns.
- Trigonometric substitution and most non-linear substitutions are not implemented.
- Improper integrals are out of scope: limits must be finite, and an integrand unbounded inside the interval is not detected.
- The inverse trigonometric functions have no entry in the antiderivative table, so integrating arcsin or arctan directly is refused.
Common mistakes
Dropping the constant of integration
Why it happens. The expression looks complete without it, and it contributes nothing to a definite integral, so the habit of omitting it survives into indefinite work where it matters.
How to avoid it. Write + C on every indefinite answer. It represents the whole family of antiderivatives, and losing it loses the general solution to any differential equation built on it.
Applying the power rule at an exponent of minus one
Why it happens. The rule looks universal, and the failure is a division by zero hidden one step into the arithmetic rather than an obvious error.
How to avoid it. Treat that exponent as its own case: the antiderivative is the natural logarithm of the absolute value, not a power.
Forgetting to divide after a linear substitution
Why it happens. Integrating exp(2x) as exp(2x) alone is a natural slip: the shape of the answer is right, and only the constant factor is missing.
How to avoid it. Differentiate what you wrote. If the result carries an extra factor of the inner slope, dividing by that slope fixes it.
Frequently asked questions
Which integration techniques does it use?
Linearity, the reverse power rule, a table of standard antiderivatives, linear substitution, substitution where the integrand already contains the inner derivative, partial fractions with a quadratic denominator, and integration by parts for polynomial-times-trigonometric, polynomial-times-exponential and logarithm patterns.
What if it cannot find an antiderivative?
It says so rather than approximating. Some integrands need techniques outside the implemented set; others, such as exp(−x²), have no elementary antiderivative at all. For a definite integral, the numeric definite-integral tool returns a figure either way.
How do I get a definite integral?
Fill in both the lower and upper limits. The antiderivative is found first, then evaluated at each limit, and the difference reported. Leaving either blank gives the indefinite answer with + C.
Why does my answer look different from the one shown?
Two antiderivatives of the same function may differ by a constant and both be correct, and the simplifier does not aim at a textbook form. Differentiating both expressions is the definitive check.