Skip to content
Calculus Solver

Integral Calculator

Find antiderivatives and evaluate definite integrals, including improper ones with infinite bounds. Each solution names the technique used, and every antiderivative is checked by differentiating it before you see it.

Operation
Your expression will be shown here as it will be read.

Solved entirely in your browser. Nothing you type is sent to a server or stored, and no account is needed.

Try an example

Indefinite and definite integrals

Thin rectangles filling the area under a curve, approximating its integral

An indefinite integral ∫f(x) dx is the family of all antiderivatives of f: functions F with F′ = f. Because any constant disappears when you differentiate, the answer always includes an arbitrary constant + C.

A definite integral ∫ₐᵇ f(x) dx is a number: the signed area between the graph of f and the x-axis from a to b. The Fundamental Theorem of Calculus links the two ideas. Any antiderivative F turns a definite integral into a subtraction.

∫abf(x) dx=F(b)−F(a),F′(x)=f(x)\int_{a}^{b} f(x)\,dx = F(b) - F(a), \qquad F'(x) = f(x)

Integration rules and techniques

Unlike differentiation, integration has no rule that always works. The calculator tries these techniques in order, from the simplest to the most involved.

  • Power rule

    ∫xn dx=xn+1n+1+C,n≠−1\int x^{n}\,dx = \frac{x^{n+1}}{n+1} + C,\quad n \neq -1

    The workhorse for polynomials and roots.

  • Reciprocal rule

    ∫1x dx=ln⁡∣x∣+C\int \frac{1}{x}\,dx = \ln|x| + C

    The absolute value keeps the answer valid for negative x as well.

  • Exponential and trig forms

    ∫exdx=ex+C,∫sin⁡x dx=−cos⁡x+C,∫cos⁡x dx=sin⁡x+C\int e^{x}dx = e^{x} + C,\quad \int \sin x\,dx = -\cos x + C,\quad \int \cos x\,dx = \sin x + C

    Linear inner functions such as e^(3x+1) are handled by dividing by the slope.

  • u-substitution

    ∫f(g(x)) g′(x) dx=∫f(u) du,u=g(x)\int f\big(g(x)\big)\,g'(x)\,dx = \int f(u)\,du,\quad u = g(x)

    The reverse of the chain rule: look for a function and its derivative appearing together.

  • Integration by parts

    ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du

    The reverse of the product rule. Choose u by LIATE: Logs, Inverse trig, Algebraic, Trig, Exponential.

  • Partial fractions

    1x2−4=1/4x−2−1/4x+2\frac{1}{x^{2} - 4} = \frac{1/4}{x - 2} - \frac{1/4}{x + 2}

    Rational functions are split into simple fractions after any polynomial long division.

How this calculator works

The calculator first applies the constant, sum and constant-multiple rules, then checks a table of standard forms. If neither finishes the job, it tries rewriting (expanding products, splitting fractions), polynomial long division and partial fractions for rational functions, then u-substitution with every plausible inner function, then integration by parts. Each successful technique is recorded as a step.

If none of these rules works, a bundled computer algebra system (Algebrite, running in your browser) is tried as a fallback. Answers from the fallback are labelled as such and come without full steps.

Whatever the source, the answer is differentiated and compared with your integrand at a range of sample points. If they disagree, the answer is not shown; you see an honest “could not find an antiderivative” message instead.

For definite integrals, the calculator evaluates F(b) − F(a), using limits for infinite bounds or where F is undefined at an endpoint. It cross-checks the result with tanh-sinh numerical integration. When there is no elementary antiderivative, such as ∫e^(−x²) dx, you get an accurate numerical value instead.

For the full details, including how answers are verified, see how the solver works.

Worked examples

Work through these by hand first, then enter them above to compare each step.

Example 1

Polynomial (power rule)

∫(6x2−4x+3)dx\int \left(6x^{2} - 4x + 3\right)dx
  1. Integrate term by term with the power rule.

    6⋅x33−4⋅x22+3x+C6\cdot\frac{x^{3}}{3} - 4\cdot\frac{x^{2}}{2} + 3x + C

Answer

2x3−2x2+3x+C2x^{3} - 2x^{2} + 3x + C

Example 2

u-substitution

∫2xcos⁡(x2)dx\int 2x\cos\left(x^{2}\right)dx
  1. Let u = x², so du = 2x dx. The integrand is exactly cos(u) du.

    ∫cos⁡u du=sin⁡u+C\int \cos u\,du = \sin u + C
  2. Substitute back u = x².

Answer

sin⁡(x2)+C\sin\left(x^{2}\right) + C

Example 3

Integration by parts

∫xcos⁡x dx\int x\cos x\,dx
  1. Choose u = x (algebraic) and dv = cos x dx, so du = dx and v = sin x.

    xsin⁡x−∫sin⁡x dxx\sin x - \int \sin x\,dx
  2. The remaining integral is −cos x, and subtracting it adds cos x.

Answer

xsin⁡x+cos⁡x+Cx\sin x + \cos x + C

Example 4

Partial fractions

∫1x2−4 dx\int \frac{1}{x^{2} - 4}\,dx
  1. Factor x² − 4 = (x − 2)(x + 2) and split the fraction. The cover-up method gives A = 1/4 and B = −1/4.

    1x2−4=14⋅1x−2−14⋅1x+2\frac{1}{x^{2}-4} = \frac{1}{4}\cdot\frac{1}{x - 2} - \frac{1}{4}\cdot\frac{1}{x + 2}
  2. Each piece integrates to a logarithm.

Answer

14ln⁡∣x−2∣−14ln⁡∣x+2∣+C\frac{1}{4}\ln|x - 2| - \frac{1}{4}\ln|x + 2| + C

Example 5

Definite integral

∫02(x3+1)dx\int_{0}^{2}\left(x^{3} + 1\right)dx
  1. An antiderivative is F(x) = x⁴/4 + x.

    [x44+x]02=(4+2)−(0+0)\left[\frac{x^{4}}{4} + x\right]_{0}^{2} = \left(4 + 2\right) - \left(0 + 0\right)

Answer

66

Example 6

Improper integral

∫1∞1x2 dx\int_{1}^{\infty}\frac{1}{x^{2}}\,dx
  1. Replace the infinite bound with a limit.

    lim⁡b→∞[−1x]1b=lim⁡b→∞(1−1b)\lim_{b\to\infty}\left[-\frac{1}{x}\right]_{1}^{b} = \lim_{b\to\infty}\left(1 - \frac{1}{b}\right)
  2. As b grows, 1/b → 0, so the area is finite.

Answer

11

Common mistakes

  • Dropping + C

    An indefinite integral is a family of functions. Leaving out the constant loses information and often costs marks.

  • Forgetting du

    In u-substitution the dx must become du as well. ∫cos(x²) dx cannot be done with u = x² because there is no 2x factor to absorb.

  • Missing absolute values

    ∫1/x dx = ln|x| + C. Writing ln x silently restricts the answer to x > 0.

  • Integrating across an asymptote

    ∫ from −1 to 1 of 1/x² dx is not −2. The integrand blows up at x = 0, so the integral diverges. The calculator checks for this and says so.

  • Sign errors in integration by parts

    ∫u dv = uv − ∫v du. The minus sign applies to the whole remaining integral, which matters when you integrate by parts twice.

Limitations

  • Some integrals, such as ∫e^(x²) dx and ∫sin(x)/x dx, have no antiderivative made of elementary functions. The calculator says so instead of inventing one. Definite versions still get a numerical value.
  • Double and triple integrals, line integrals and integrals with symbolic bounds are not supported.
  • Trig substitution and some advanced partial-fraction cases are handled by the computer algebra fallback without detailed steps.
  • Antiderivatives can differ from your textbook's by a constant, or be written in an equivalent form, and still be correct.
  • Numerical values are typically accurate to about 10 significant digits. Highly oscillatory improper integrals may not converge numerically.

Frequently asked questions

How do I enter a definite integral?

Select “Definite integral”, type the integrand, then enter the lower and upper bounds. Bounds can be numbers, expressions like pi/2, or inf and -inf for improper integrals.

Why is my answer different from the back of the book?

Two antiderivatives of the same function can differ by a constant. For example, sin²(x)/2 and −cos²(x)/4 + C are both valid for ∫sin x cos x dx. Differentiate both answers: if you get the integrand each time, both are right.

What does “no elementary antiderivative” mean?

Some functions have antiderivatives that cannot be written using powers, roots, exponentials, logs and trig functions. e^(x²) is the classic example. Its antiderivative is expressed with the special error function. Definite integrals of such functions can still be computed numerically.

How is each answer checked?

The calculator differentiates its own answer and compares it numerically with your integrand at many sample points. Definite integrals are also compared with an independent numerical integration.

Can it solve improper integrals?

Yes. Use inf or -inf as a bound. The calculator also detects vertical asymptotes inside the interval and reports when an integral diverges.

Next step

Pick one of the worked examples, solve it on paper, then enter it in the calculator and compare your steps with each rule shown. Spotting where your work differs is the fastest way to improve.

Back to the calculator