100% free no uploads no sign-up

integral calculator

Integration reverses differentiation: the integral of f(x) is a function whose derivative is f(x), plus a constant C. Type a function to see which method works — standard integrals, substitution, integration by parts or partial fractions — and every answer is checked by differentiating it.

mode: integral

Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas

problem
∫ x·e^x dx
answer
∫ x·e^x dx = e^x(x − 1) + C

✓ checked: differentiating the answer gives back the original function (tested at several points).

step-by-step working

  1. Integration by parts: ∫u dv = u·v − ∫v du, with u = x and dv = e^x dx. Then du = dx and v = e^x.

    ∫ x·e^x dx = x·e^x − ∫ e^x dx
  2. Standard integral: ∫eᵘ du = eᵘ.

    ∫ e^x dx = e^x
  3. Put the pieces together.

    ∫ x·e^x dx = x·e^x − e^x
  4. Add the constant of integration C (any constant differentiates to 0).

Methods it uses

Worked examples

∫ (3x² + 2x − 5) dx

answer
∫ (3x² + 2x − 5) dx = x³ + x² − 5x + C

✓ checked: differentiating the answer gives back the original function (tested at several points).

step-by-step working

  1. Integrate term by term (the integral of a sum is the sum of the integrals).

  2. Move the constant 3 outside the integral.

    ∫ 3x² dx = 3·∫ x² dx
  3. Power rule: ∫uⁿ du = uⁿ⁺¹/(n + 1) with n = 2.

    ∫ x² dx = x³/3
  4. Move the constant 2 outside the integral.

    ∫ 2x dx = 2·∫ x dx
  5. Power rule: ∫x dx = x²/2.

    ∫ x dx = x²/2
  6. The integral of a constant k is k·x.

    ∫ −5 dx = −5x
  7. Add the constant of integration C (any constant differentiates to 0).

∫ x·cos(x) dx

answer
∫ x·cos(x) dx = x·sin(x) + cos(x) + C

✓ checked: differentiating the answer gives back the original function (tested at several points).

step-by-step working

  1. Integration by parts: ∫u dv = u·v − ∫v du, with u = x and dv = cos(x) dx. Then du = dx and v = sin(x).

    ∫ x·cos(x) dx = x·sin(x) − ∫ sin(x) dx
  2. Standard integral: ∫sin(u) du = −cos(u).

    ∫ sin(x) dx = −cos(x)
  3. Put the pieces together.

    ∫ x·cos(x) dx = x·sin(x) + cos(x)
  4. Add the constant of integration C (any constant differentiates to 0).

∫ 2x/(x² + 1) dx

answer
∫ 2x/(x² + 1) dx = ln(x² + 1) + C

✓ checked: differentiating the answer gives back the original function (tested at several points).

step-by-step working

  1. Move the constant 2 outside the integral.

    ∫ 2x/(x² + 1) dx = 2·∫ x/(x² + 1) dx
  2. The top is 1/2 times the derivative of the bottom, so ∫f′/f dx = ln|f|.

    ∫ x/(x² + 1) dx = ln(x² + 1)/2
  3. Add the constant of integration C (any constant differentiates to 0).

Definite integrals

Type limits with from and to, for example "integrate x^2 from 0 to 1". The solver finds the antiderivative F, works out F(upper) − F(lower) exactly, and compares it with a numerical estimate (Simpson's rule). If the function blows up between the limits, it tells you the integral is improper instead of giving a misleading number.

When there are no steps

Some integrals need techniques the step-by-step engine doesn't cover. In that case a larger algebra library may find the answer; you'll see it marked "steps not available", still checked by differentiating. A few functions, such as e^(x²) and sin(x)/x, have no antiderivative made of ordinary functions at all.

Common mistakes

Common integrals, worked out

Frequently asked questions

How do I type an integral?

Start with integrate or ∫, or pick the integral mode, then type the function. A trailing dx is optional. For a definite integral add from a to b, e.g. integrate sin(x) from 0 to pi.

How do I know the answer is right?

Differentiate it: you should get back the function you started with. The solver does exactly that at several test points before showing the answer.

Why is there an absolute value in ln|x|?

ln(x) only exists for positive x, but 1/x is defined for negative x too. ln|x| works on both sides, and its derivative is 1/x everywhere except 0.

Why might my answer differ from another calculator's?

Antiderivatives can differ by a constant, and identities can change their look: −cos²(x)/2 and sin²(x)/2 differ only by a constant, so both are correct.

More math tools