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
    ∫2x dx=x2,∫1 dx=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)4 dx\int 2x\,(x^2 + 1)^4\,dx
  1. Spot the inside function and its derivative
    u=x2+1  ⇒  du=2x dxu = x^2 + 1 \;\Rightarrow\; du = 2x\,dx
  2. The integral becomes simple
    ∫u4 du\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

∫xex dx\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
    xex−∫ex dxx e^x - \int e^x\,dx
  4. Finish
    xex−ex+C=ex(x−1)+Cx e^x - e^x + C = e^x(x - 1) + C
Answer
ex(x−1)+Ce^x(x - 1) + C

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

∫1x2−1 dx\int \frac{1}{x^2 - 1}\,dx
  1. Factor the denominator
    x2−1=(x−1)(x+1)x^2 - 1 = (x - 1)(x + 1)
  2. Split into partial fractions
    1(x−1)(x+1)=Ax−1+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
    12ln⁡∣x−1∣−12ln⁡∣x+1∣+C\tfrac{1}{2}\ln\lvert x - 1 \rvert - \tfrac{1}{2}\ln\lvert x + 1 \rvert + C
  5. Combine the logs
    12ln⁡∣x−1x+1∣+C\tfrac{1}{2}\ln\left\lvert \frac{x - 1}{x + 1} \right\rvert + C
Answer
12ln⁡∣x−1x+1∣+C\tfrac{1}{2}\ln\left\lvert \dfrac{x - 1}{x + 1} \right\rvert + C

Solved problems

Asked here and worked through in full. Open one for every step.

  1. Evaluate: integral from 1 to 2 of (3x^2 - 2x) dx
    Answer 44
  2. Evaluate the integral of (2x + 1) dx from 0 to 3
    Answer 1212

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

What is an integral?

The accumulation of a quantity, and the area under a curve. It is the reverse of differentiation, which is why it is also called the antiderivative.

How do I integrate?

Reverse the power rule: raise the exponent by one and divide by the new exponent. The integral of 3x² is x³, plus a constant of integration for an indefinite integral.

What is integration by parts?

The rule for a product: ∫u dv = uv − ∫v du. Choose u as the part that gets simpler when differentiated, which for ∫x eˣ dx means u = x.

What is u-substitution?

Renaming an inner function as u so the integral matches a standard form. It is the chain rule run backwards, and it works when the derivative of the inner function is also present.

What is the difference between a definite and an indefinite integral?

An indefinite integral is a family of functions and carries + C. A definite integral has limits, so you evaluate at both and subtract, and the constant cancels.

How do I find the area under a curve?

Integrate the function between the two x values. If the curve dips below the axis, split the integral at the crossing point and add the absolute values, or the parts will cancel.

How do I find the area between two curves?

Integrate the upper curve minus the lower one, between the points where they meet. For y = x² and y = 2x the meeting points are 0 and 2, and the area is 4/3.

Why does my answer need + C?

Any constant differentiates to zero, so infinitely many functions share the same derivative. The + C records that, and it is the mark most commonly lost in an indefinite integral.