Integrals calculator

Integral Calculator

Type integrate followed by the function and dx. The integral calculator finds the antiderivative with the method it needs — power rule, substitution or parts — adds the constant of integration, and differentiates the result back to prove it.

  • Independent answer checks
  • Every step shown
  • Free, no sign-up

What math problem do you want to solve?

Ctrl+V pastes a screenshot · Shift+Enter: new line (one equation per line)

Try

Typed problems our engine solves stay in your browser. Photos, screenshots, PDFs and AI-helped problems are processed by our AI service — privacy.

Integrals · worked example✓ Verified
∫xex dx\int x e^{x} \, dx
Integrate with respect to x
∫x⋅(ex) dx\int x \cdot (e^{x}) \, dx
Use the exponential rule
∫exdx=ex+C dx\int e^{x} dx = e^{x} + C \, dx
Add the constant of integration
ex⋅(x−1)+Ce^{x} \cdot (x-1) + C
ex⋅(x−1)+Ce^{x} \cdot (x-1) + CRe-checked by a second engine
Integrals · worked example✓ Verified
∫cos⁡(3x) dx\int \cos(3x) \, dx
Integrate with respect to x
∫cos⁡(3x) dx\int \cos(3x) \, dx
Use the standard trig integral
∫sin=−cos,∫cos=sin⁡(+C) dx\displaystyle \int sin = -cos,\allowbreak ∫ cos = \sin(+ C) \, dx
Add the constant of integration
(13)⋅sin⁡(3x)+C(\frac{1}{3}) \cdot \sin(3x) + C
(13)⋅sin⁡(3x)+C(\frac{1}{3}) \cdot \sin(3x) + CRe-checked by a second engine
Integrals · worked example✓ Verified
∫x dx\int \sqrt{x} \, dx
Integrate with respect to x
∫x dx\int \sqrt{x} \, dx
Find the antiderivative
(23)⋅x32(\frac{2}{3}) \cdot x^{\frac{3}{2}}
Add the constant of integration
(23)⋅x32+C(\frac{2}{3}) \cdot x^{\frac{3}{2}} + C
(23)⋅x32+C(\frac{2}{3}) \cdot x^{\frac{3}{2}} + CRe-checked by a second engine

1 / 3

Quick examples

Study guide

How to solve integrals

An indefinite integral finds the antiderivative: the function whose derivative is the one you started with. It reverses differentiation — so every rule you learned for derivatives has a mirror image here.

The power rule for integrals: ∫xⁿ dx = xⁿ⁺¹/(n+1) + C. For x², add one to the exponent and divide by the new exponent: x³/3 + C.

Never forget the + C. Because the derivative of any constant is zero, antiderivatives come in families differing by a constant — the constant of integration records that.

Memorize the core antiderivatives: ∫sin(x) dx = −cos(x) + C, ∫cos(x) dx = sin(x) + C, ∫eˣ dx = eˣ + C, and ∫1/x dx = ln|x| + C. Most test problems are combinations of these.

Check by differentiating your answer: the derivative of x³/3 + C is x², which is what you started with. The solver differentiates every antiderivative to verify it.

Three curves y = 2x³ − 2x² + x + C for C = −1, 0 and 1, each a vertical shift of the others; at x = 1 all three have parallel tangent lines of slope 3.
Why the + C matters: 2x³ − 2x² + x + C for every C differentiates back to 6x² − 4x + 1, so the curves are vertical shifts with the same slope at every x (slope 3 at x = 1).

Checking the result

How this result is checked

For a supported indefinite integral, the math engine can differentiate the antiderivative and compare with the integrand. Definite integrals use a different checking route where available.

Choosing a technique

Which integration method should I use?

Integration has no product or chain rule that always works, so the skill is recognizing which technique fits. A practical order to try:

  1. A standard form? Powers of x, ekxe^{kx}, sin⁡\sin, cos⁡\cos and 1x\frac{1}{x} have antiderivatives you can write down directly.
  2. A linear inside? cos⁡(3x)\cos(3x) or e2x+1e^{2x + 1}: integrate as usual and divide by the coefficient of x.
  3. Inside function with its derivative outside? That is u-substitution: in 2x(x2+1)32x(x^2 + 1)^3, the 2x is the derivative of x2+1x^2 + 1.
  4. A product of unlike functions? xexx e^x or xsin⁡xx \sin x suggests integration by parts. Let u be the part that simplifies when differentiated (usually the power of x).

Checking an integral

How the integral calculator checks its answer

Integration is the reverse of differentiation, so every antiderivative carries its own test: differentiate it, and you must get back the function you started with. This is exactly how the calculator verifies its answers, sampled numerically at many points.

It also explains why answers can look different and both be right. 12sin⁡2x\tfrac{1}{2}\sin^2 x and −14cos⁡2x-\tfrac{1}{4}\cos 2x have the same derivative; they differ by a constant, which the +C+ C absorbs.

For an integral that is one step of a longer calculus question, type the full question into the AI math solver and look for the Verified badge to see whether its check succeeded.

Reference

Standard antiderivatives

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)

Add one to the power, divide by the new power.

Reciprocal

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

The one power the power rule cannot do.

Exponential

∫ekx dx=1kekx+C\int e^{kx}\,dx = \frac{1}{k}e^{kx} + C

Trig

∫cos⁡(kx) dx=1ksin⁡(kx)+C\int \cos(kx)\,dx = \frac{1}{k}\sin(kx) + C

And ∫sin⁡(kx) dx=−1kcos⁡(kx)+C\int \sin(kx)\,dx = -\frac{1}{k}\cos(kx) + C.

Substitution

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

With u=g(x)u = g(x).

By parts

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

Choose u by LIATE: logs, inverse trig, algebraic, trig, exponential.

Worked examples

Integrals, worked step by step

Each solution below is the solver’s own working, checked before it was published. Press “Solve it live” to open it in the calculator above.

Example 1 · A polynomial

∫6x2−4x+1 dx\int 6x^{2} - 4x + 1 \, dx

Term by term with the power rule; the constant 1 integrates to x.

x−2x2+2x3+Cx-2x^{2}+2x^{3} + C
✓ Verified
  1. Integrate with respect to x
    ∫6(x2)−(4x)+1 dx\int 6(x^{2})-(4x)+1 \, dx
    This is the antiderivative to find.
  2. Integrate term by term
    ∫(f+g)=∫f+∫g dx\int (f + g) = ∫f + ∫g \, dx
    Integrals split over sums exactly like derivatives do.
  3. Add the constant of integration
    x−2x2+2x3+Cx-2x^{2}+2x^{3} + C
    Derivatives kill constants, so every antiderivative comes with an unknown + C.

Example 2 · A fractional power

∫x dx\int \sqrt{x} \, dx

Rewrite x\sqrt{x} as x1/2x^{1/2}, then use the power rule.

(23)⋅x32+C(\frac{2}{3}) \cdot x^{\frac{3}{2}} + C
✓ Verified
  1. Integrate with respect to x
    ∫x dx\int \sqrt{x} \, dx
    This is the antiderivative to find.
  2. Find the antiderivative
    (23)⋅x32(\frac{2}{3}) \cdot x^{\frac{3}{2}}
    Apply the standard integral rules.
  3. Add the constant of integration
    (23)⋅x32+C(\frac{2}{3}) \cdot x^{\frac{3}{2}} + C
    Derivatives kill constants, so every antiderivative comes with an unknown + C.

Example 3 · A linear inside function

∫cos⁡(3x) dx\int \cos(3x) \, dx

The 3 inside means dividing by 3 outside.

(13)⋅sin⁡(3x)+C(\frac{1}{3}) \cdot \sin(3x) + C
✓ Verified
  1. Integrate with respect to x
    ∫cos⁡(3x) dx\int \cos(3x) \, dx
    This is the antiderivative to find.
  2. Use the standard trig integral
    ∫sin=−cos,∫cos=sin⁡(+C) dx\displaystyle \int sin = -cos,\allowbreak ∫ cos = \sin(+ C) \, dx
    These are memorised standard forms.
  3. Add the constant of integration
    (13)⋅sin⁡(3x)+C(\frac{1}{3}) \cdot \sin(3x) + C
    Derivatives kill constants, so every antiderivative comes with an unknown + C.

Example 4 · Integration by parts

∫xex dx\int x e^{x} \, dx

Let u = x (it simplifies when differentiated) and dv = ex dxe^x\,dx.

ex⋅(x−1)+Ce^{x} \cdot (x-1) + C
✓ Verified

Differentiate the answer with the product rule and you get xexxe^x back — that is the check.

  1. Integrate with respect to x
    ∫x⋅(ex) dx\int x \cdot (e^{x}) \, dx
    This is the antiderivative to find.
  2. Use the exponential rule
    ∫exdx=ex+C dx\int e^{x} dx = e^{x} + C \, dx
    e^x is its own derivative, so it is its own integral too.
  3. Add the constant of integration
    ex⋅(x−1)+Ce^{x} \cdot (x-1) + C
    Derivatives kill constants, so every antiderivative comes with an unknown + C.

Avoid these

Common integrals mistakes

  • Forgetting + C

    An indefinite integral is a family of functions. Without + C the answer is incomplete, and many teachers deduct for it.

  • Power rule on 1/x

    ∫x−1 dx\int x^{-1}\,dx would need dividing by zero. It is ln⁡∣x∣\ln|x| instead.

  • Multiplying instead of dividing

    The antiderivative of cos⁡3x\cos 3x is 13sin⁡3x\tfrac{1}{3}\sin 3x. Multiplying by 3 is what differentiation does.

  • Integrating a product factor by factor

    ∫xex dx\int x e^x\,dx is not x22⋅ex\tfrac{x^2}{2} \cdot e^x. Products need substitution or parts.

  • Leaving u in the answer

    After substitution, write the answer back in terms of x.

  • Wrong choice of u in parts

    Choosing u=exu = e^x in ∫xex dx\int xe^x\,dx makes the new integral harder. If it gets worse, swap.

FAQ

Integrals calculator FAQ

What is the power rule for integrals?

∫xⁿ dx = xⁿ⁺¹/(n+1) + C. So ∫x² dx = x³/3 + C. It is the reverse of the derivative power rule.

Why do we add +C?

Because differentiating kills constants, many functions share one antiderivative shape. +C represents the whole family of antiderivatives.

What is the integral of 1/x?

ln|x| + C. This is the one exception to the power rule — the rule would divide by zero at n=−1.

How do I check an integral answer?

Differentiate it. If you get back the original integrand, the antiderivative is correct. Our solver runs this check on every integral.

Can it do definite integrals?

Find the antiderivative here, then evaluate it at the upper limit minus the lower limit (the Fundamental Theorem of Calculus). The constant C cancels, so you can leave it out of that subtraction.

Why does the answer use log instead of ln?

In the solver’s output, log means the natural logarithm, ln. For ∫1x dx\int \frac{1}{x}\,dx the textbook answer is ln⁡∣x∣+C\ln|x| + C — the absolute value keeps it valid for negative x.

How do I type an integral?

Write integrate, then the function, then dx: integrate x e^x dx. A short form integrate(x^2) also works for functions of x.

Your own integrals problem

Give the integral calculator your function and dx — see the technique named, the + C added, and the check that proves it.