Skip to main content

Integral Calculator

Try an example:

This integral calculator finds definite and indefinite integrals and shows the steps it used. Each answer is checked before you see it. It is free to use and is part of our math solver.

How to Use the Integral Calculator

Enter Your Function

Type just the function, such as x^2+3x or x e^x. The part you integrate is called the integrand.

Add Limits

For a definite integral, add the limits in words: x^2 from 0 to 3. You can use infinity as a limit.

Read the Steps

Each step names its rule, such as substitution or integration by parts. A few hard integrals show an answer without steps, and the page says so.

What Is an Integral?

An integral adds up infinitely many tiny pieces. An indefinite integral finds a family of functions, called antiderivatives, whose derivative is the function you started with. A definite integral has two limits and gives one number: the signed area between the curve and the x-axis.

Basic Integration Rules

FunctionIntegral
kk (a constant)kx+Ckx+C
xnx^n, when n≠−1n\neq -1xn+1n+1+C\dfrac{x^{n+1}}{n+1}+C
1x\dfrac{1}{x}ln⁡∣x∣+C\ln\lvert x\rvert+C
exe^xex+Ce^x+C
sin⁡x\sin x−cos⁡x+C-\cos x+C
cos⁡x\cos xsin⁡x+C\sin x+C
sec⁡2x\sec^2 xtan⁡x+C\tan x+C

You can integrate a sum term by term, and you can move a constant number outside. The power rule in words: raise the power by 1, then divide by the new power.

Integration undoes differentiation, so you can check any answer with the derivative calculator.

Methods This Integration Calculator Uses

Substitution

This is the chain rule in reverse. Look for a function inside another function, with its derivative as a factor. In ∫2xex2 dx\int 2xe^{x^2}\,dx, let u=x2u=x^2. Then du=2x dxdu=2x\,dx, and the integral becomes ∫eu du=ex2+C\int e^u\,du=e^{x^2}+C.

Integration by Parts

This is the product rule in reverse:

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

In words: the integral of u dv equals uv minus the integral of v du. Choose uu to be the part that gets simpler when you differentiate it.

Partial Fractions

Split a fraction into smaller ones. For example, 1x2−1=12(x−1)−12(x+1)\dfrac{1}{x^2-1}=\dfrac{1}{2(x-1)}-\dfrac{1}{2(x+1)}. Each piece then gives a log.

Which method should you choose? Try the basic rules first. If you see an inside function and its derivative, substitute. If you see a product such as xx times exe^x, use parts. If you see a polynomial over a polynomial, use partial fractions, which needs the bottom to be factored. The factoring calculator can help with that.

Definite vs Indefinite Integrals

IndefiniteDefinite
LimitsNoneA lower and an upper one
AnswerA family of functionsOne number
Plus CC?YesNo, it cancels out
Example∫x2 dx=x33+C\int x^2\,dx=\frac{x^3}{3}+C∫03x2 dx=9\int_0^3 x^2\,dx=9

The link between them is the fundamental theorem of calculus: find an antiderivative FF, then work out F(b)−F(a)F(b)-F(a).

Integral calculator picture: the area under y equals x squared from 0 to 3 is shaded and equals 9

Worked Examples

Example 1: The Power Rule

Find ∫(x2+3x) dx\int (x^2+3x)\,dx.

  1. Integrate each term: x2x^2 becomes x33\frac{x^3}{3}, and 3x3x becomes 3x22\frac{3x^2}{2}.
  2. Add the constant: x33+3x22+C\dfrac{x^3}{3}+\dfrac{3x^2}{2}+C.

Example 2: Integration by Parts

Find ∫xex dx\int xe^x\,dx.

  1. Let u=xu=x and dv=ex dxdv=e^x\,dx. Then du=dxdu=dx and v=exv=e^x.
  2. Put these into the formula: xex−∫ex dxxe^x-\int e^x\,dx.
  3. Finish: xex−ex+Cxe^x-e^x+C.

Example 3: A Definite Integral

Find ∫03x2 dx\int_0^3 x^2\,dx.

  1. An antiderivative is F(x)=x33F(x)=\frac{x^3}{3}.
  2. F(3)=9F(3)=9 and F(0)=0F(0)=0.
  3. Subtract: 9−0=99-0=9.

Common Mistakes to Check

Leaving Out the Constant C

Every indefinite integral needs +C+C. Without it you give one function, not the whole family.

Treating a Product Like a Sum

The integral of a product is not the product of the integrals. ∫xex dx\int xe^x\,dx is not x22ex\frac{x^2}{2}e^x.

Using the Power Rule on 1/x

It would divide by zero. Use ln⁡∣x∣\ln\lvert x\rvert instead.

Practice Problems

  1. Find ∫4x3 dx\int 4x^3\,dx.
  2. Find ∫(cos⁡x+2) dx\int (\cos x+2)\,dx.
  3. Find ∫142x dx\int_1^4 2x\,dx.
  4. Find ∫xcos⁡x dx\int x\cos x\,dx.
  5. Find ∫−21x3 dx\int_{-2}^{1} x^3\,dx.
Show the answers
  1. x4+Cx^4+C
  2. 2x+sin⁡x+C2x+\sin x+C
  3. 1515
  4. xsin⁡x+cos⁡x+Cx\sin x+\cos x+C
  5. −154-\dfrac{15}{4}

Related Calculators

Learn More

FAQ

Why Is There a Plus C?

The derivative of any constant is zero. So x2x^2, x2+5x^2+5 and x2−9x^2-9 all have the derivative 2x2x. The CC stands for all of those possible constants.

Is an Antiderivative the Same as an Integral?

An indefinite integral is the family of all antiderivatives. So for that kind, an antiderivative calculator and this page do the same job.

Which Functions Have No Simple Integral?

e−x2e^{-x^2} is the famous one. It has an integral, but not one you can write with ordinary functions. The calculator tells you when it can't find one.

Can a Definite Integral Be Negative?

Yes. Area below the xx-axis counts as negative. For example, ∫−31x dx=−4\int_{-3}^{1}x\,dx=-4, because more of the area is below than above.

What Can This Integral Calculator Not Do?

Double integrals, and integrals that blow up at a limit, such as 1x\frac{1}{\sqrt{x}} from 0 to 1. As a definite integral calculator it does accept infinite limits: ∫1∞1x2 dx=1\int_1^\infty\frac{1}{x^2}\,dx=1.

What Are Integrals Used For?

Areas, volumes, distance from speed, total change from a rate, and probability.


Next step: integrate one function by hand, differentiate your answer to check it, then compare with the integral calculator above.