SolveMathAI

Integral calculator

Definite or indefinite, with the substitution written out and the constant kept.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

Integration is differentiation run backwards, and unlike differentiation there is no single procedure that always works. There is a short list of techniques and an order worth trying them in. Each example below names the technique and shows the substitution in full.

Which technique to try

Work down the list. The first one that fits is nearly always the intended method.

  1. Rewrite it first

    Expand brackets, split fractions, use a trig identity. A surprising number of integrals become standard forms after one line of algebra.

  2. Substitution

    Look for a function and its derivative both present. In 2x(x² + 1)⁴, the 2x is exactly the derivative of x² + 1, so let u be the inside.

  3. Integration by parts

    For a product of two unlike things, such as a polynomial times an exponential or a log. ∫u dv = uv − ∫v du, and LIATE picks u: logs, inverse trig, algebraic, trig, exponential.

  4. Partial fractions

    For a rational function whose bottom factors. Split it into simpler fractions and integrate each, usually into logarithms.

  5. Definite integrals: change the limits too

    If you substitute, either convert the limits to the new variable or convert back before evaluating. Mixing the two is the classic error.

  6. Check by differentiating

    Differentiate your answer. If it is not the original integrand, something went wrong, and this takes seconds.

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Evaluate the integral of (2x + 1) dx from 0 to 3

03(2x+1)dx\int_0^3 (2x + 1)\,dx
  1. Integrate term by term
    2xdx=x2,1dx=x\int 2x\,dx = x^2, \qquad \int 1\,dx = x
  2. Antiderivative
    F(x)=x2+xF(x) = x^2 + x
  3. Fundamental theorem: F(b) − F(a)
    F(3)F(0)=(9+3)0F(3) - F(0) = (9 + 3) - 0
Answer
1212

A definite integral needs no + C: the constant cancels in the subtraction.

Integrate 2x(x^2 + 1)^4 dx

2x(x2+1)4dx\int 2x\,(x^2 + 1)^4\,dx
  1. Spot the inside function and its derivative
    u=x2+1    du=2xdxu = x^2 + 1 \;\Rightarrow\; du = 2x\,dx
  2. The integral becomes simple
    u4du\int u^4\,du
  3. Power rule for integration
    u55+C\frac{u^5}{5} + C
  4. Substitute back
    (x2+1)55+C\frac{(x^2 + 1)^5}{5} + C
Answer
(x2+1)55+C\dfrac{(x^2 + 1)^5}{5} + C

Integrate x * e^x dx

xexdx\int x e^x\,dx
  1. Integration by parts, with u the algebraic part
    u=x,dv=exdxu = x,\quad dv = e^x dx
  2. Differentiate and integrate
    du=dx,v=exdu = dx, \qquad v = e^x
  3. Apply ∫u dv = uv − ∫v du
    xexexdxx e^x - \int e^x\,dx
  4. Finish
    xexex+C=ex(x1)+Cx e^x - e^x + C = e^x(x - 1) + C
Answer
ex(x1)+Ce^x(x - 1) + C

Integrate 1/(x^2 - 1) dx using partial fractions

1x21dx\int \frac{1}{x^2 - 1}\,dx
  1. Factor the denominator
    x21=(x1)(x+1)x^2 - 1 = (x - 1)(x + 1)
  2. Split into partial fractions
    1(x1)(x+1)=Ax1+Bx+1\frac{1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1}
  3. Solve for A and B
    A=12,B=12A = \tfrac{1}{2}, \qquad B = -\tfrac{1}{2}
  4. Integrate each piece
    12lnx112lnx+1+C\tfrac{1}{2}\ln\lvert x - 1 \rvert - \tfrac{1}{2}\ln\lvert x + 1 \rvert + C
  5. Combine the logs
    12lnx1x+1+C\tfrac{1}{2}\ln\left\lvert \frac{x - 1}{x + 1} \right\rvert + C
Answer
12lnx1x+1+C\tfrac{1}{2}\ln\left\lvert \dfrac{x - 1}{x + 1} \right\rvert + C

Where marks get lost

Dropping the constant of integration

Every indefinite integral ends in + C. It is the difference between one answer and the family of all answers.

Substituting without changing dx

If u = x² + 1 then du = 2x dx. Swapping the variable but leaving dx behind changes the integral into a different one.

Old limits with a new variable

After a substitution the limits belong to u, not x. Either convert them or substitute back before evaluating.

Questions

Does it do definite and indefinite integrals?

Both. Give limits and it evaluates with the fundamental theorem; leave them out and you get the antiderivative with + C.

Which techniques does it use?

Substitution, integration by parts, partial fractions, trigonometric substitution and identities, and standard forms. It names the technique before using it.

What about improper integrals?

Yes. Infinite limits or a discontinuity are handled as a limit, and it says whether the integral converges or diverges.

What if there is no elementary antiderivative?

Some integrals, such as ∫e^(−x²) dx, have no answer in elementary functions. It says so and gives a numerical value for a definite integral instead of inventing a formula.