Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

Integral Calculator

Indefinite and definite integrals with the technique named at every step, and each antiderivative verified before it is shown.

Examples

About the Integral Calculator

Integration reverses differentiation: an antiderivative FF of ff satisfies F′(x)=f(x)F'(x) = f(x). A definite integral ∫abf(x) dx\int_a^b f(x)\,dx adds up signed area and equals F(b)−F(a)F(b) - F(a) by the fundamental theorem of calculus.

The calculator tries standard techniques in order: linearity and the power rule, known table integrals, substitution, integration by parts and partial fractions for simple rational functions. It then differentiates its own answer to confirm it. Some functions, such as ex2e^{x^2}, have no elementary antiderivative; for those a definite integral is still evaluated numerically and labeled as such.

Leave both limits empty for an indefinite integral, or fill in both for a definite one.

What is an integral?

Integration is the reverse of differentiation and, at the same time, a way of adding up infinitely many small pieces. An antiderivative of ff is a function FF whose derivative is ff: since ddxx33=x2\frac{d}{dx}\frac{x^3}{3} = x^2, the function x33\frac{x^3}{3} is an antiderivative of x2x^2. The indefinite integral ∫f(x) dx\int f(x)\,dx stands for the whole family of antiderivatives, which all differ by a constant, hence the +C+ C.

The definite integral ∫abf(x) dx\int_a^b f(x)\,dx is a number: the signed area between the graph of ff and the x-axis from aa to bb, with area below the axis counted as negative. It is defined as the limit of Riemann sums, where the interval is cut into thin strips and the areas of rectangles are added. The fundamental theorem of calculus connects the two ideas: if FF is any antiderivative of ff, then ∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a).

Integrals compute totals from rates: distance from velocity, work from force, mass from density, probability from a density curve and accumulated revenue from a rate of sales.

How to use the Integral Calculator

  1. Enter the integrand, for example x*e^x or 2x*cos(x^2). You can also type ∫ … dx or "integrate … from 0 to 1".
  2. Leave the limits empty for an antiderivative, or enter both limits for a definite integral. pi and e are allowed.
  3. Press Integrate to see the technique used, the antiderivative and, for definite integrals, the evaluation at both limits.

Formulas

Power rule

∫xn dx=xn+1n+1+C, n≠−1\int x^n\,dx = \frac{x^{n+1}}{n+1} + C,\ n \neq -1

Substitution

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

Integration by parts

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

Fundamental theorem

∫abf(x) dx=F(b)−F(a)\int_a^b f(x)\,dx = F(b) - F(a)

Worked example: ∫ x·eˣ dx

The worked example finds ∫xex dx\int x e^x\,dx. The integrand is a polynomial times an exponential, which is the classic case for integration by parts. The calculator uses the tabular method: it differentiates xx down to 0 (giving xx, 1, 0), integrates exe^x the same number of times, and combines the diagonal products with alternating signs to get xex−exxe^x - e^x. Factored, this is ex(x−1)+Ce^x(x - 1) + C. The result is verified by differentiating it numerically and comparing with xexxe^x at several points.

The solution below is generated by the same engine that powers the calculator above.

Final answer

ex(x−1)+C{e}^{x} \left( x-1\right) + C

How we read your problem

Find the indefinite integral (antiderivative) of xe^x with respect to x.

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

Step-by-step solution

  1. Start with the integral

    ∫xex dx\int x {e}^{x}\,dx
  2. Integration by parts (tabular method)

    Differentiate the polynomial x until it reaches 0, integrate e^x the same number of times, and combine with alternating signs.

    ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du
  3. Combine the alternating products

    ∫xex dx=ex(x−1)\int x {e}^{x}\,dx = {e}^{x} \left( x-1\right)
  4. Simplify and add the constant of integration

    ∫xex dx=ex(x−1)+C\int x {e}^{x}\,dx = {e}^{x} \left( x-1\right) + C

Formulas used

  • Power rule

    ∫xn dx=xn+1n+1+C, n≠−1\int x^n\,dx = \frac{x^{n+1}}{n+1} + C,\ n \neq -1

An antiderivative F satisfies F′(x) = f(x). Because the derivative of any constant is 0, every antiderivative differs by a constant C.

Verification

  • Differentiated the answer and compared it with the integrand at 8 sample points ✓

Detailed explanation

Choosing a technique

There is no single algorithm you can run by hand for every integral, so the skill is recognising the form. Start with linearity: split sums and pull out constant factors, then use the table of basic integrals for powers, exponentials, 1x\frac1x and the trigonometric functions. If part of the integrand is the derivative of another part, try substitution. If it is a product of two different kinds of function, such as a polynomial and an exponential or a polynomial and a sine, try integration by parts. Rational functions call for partial fractions, and forms like 1x2+1\frac{1}{x^2 + 1} lead to inverse trigonometric functions.

The calculator tries these techniques in a similar order and names the one that succeeded, so its steps double as a guide for which method to reach for next time.

Substitution, step by step

Substitution reverses the chain rule. In ∫2xcos⁡(x2) dx\int 2x\cos(x^2)\,dx the inner function is x2x^2 and its derivative 2x2x appears as a factor, so set u=x2u = x^2 and du=2x dxdu = 2x\,dx. The integral becomes ∫cos⁡u du=sin⁡u\int \cos u\,du = \sin u, and substituting back gives sin⁡(x2)+C\sin(x^2) + C. The calculator shows each of these lines. If the derivative of the inner function appears only up to a constant multiple, for example xcos⁡(x2)x\cos(x^2), the same substitution works after adjusting by 12\frac12.

Integration by parts and the tabular method

Integration by parts reverses the product rule: ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du. Choose uu to be the factor that gets simpler when differentiated, usually the polynomial, and dvdv to be the factor that is easy to integrate. When uu is a polynomial of degree nn, repeating the process nn times reduces it to zero, and the tabular method organises those repetitions in two columns. That is why the worked example finishes after two rows: the derivative of xx is 1 and then 0.

Definite integrals and limits

Fill in the lower and upper limits to turn the problem into a definite integral. The calculator finds an antiderivative first and then applies the fundamental theorem: for ∫03x2 dx\int_0^3 x^2\,dx it uses F(x)=x33F(x) = \frac{x^3}{3} and computes F(3)−F(0)=9−0=9F(3) - F(0) = 9 - 0 = 9. Limits may be expressions such as pi/2. If you only need the number, the dedicated definite integral calculator also works when no elementary antiderivative exists, by evaluating the area numerically.

When there is no elementary antiderivative

Some simple-looking functions, such as ex2e^{x^2}, sin⁡xx\frac{\sin x}{x} and 1+x3\sqrt{1 + x^3}, have antiderivatives that cannot be written with a finite combination of polynomials, roots, exponentials, logarithms and trigonometric functions. This is a proven fact, not a gap in technique. For these inputs the calculator reports that it could not find an antiderivative rather than inventing one, and a definite integral over a specific interval can still be computed numerically.

For example, the definite integral calculator evaluates ∫01ex2 dx≈1.4627\int_0^1 e^{x^2}\,dx \approx 1.4627 numerically and labels the result as an approximation.

Why the constant of integration matters

Because the derivative of any constant is zero, x33\frac{x^3}{3}, x33+5\frac{x^3}{3} + 5 and x33−2\frac{x^3}{3} - 2 all have derivative x2x^2. Their graphs are vertical shifts of one another, and the +C+ C records that whole family. The constant is pinned down when you have extra information, called an initial condition. If a velocity is v(t)=2tv(t) = 2t and the position at time 0 is 4, integrating gives s(t)=t2+Cs(t) = t^2 + C, and s(0)=4s(0) = 4 forces C=4C = 4. In a definite integral the constant cancels in F(b)−F(a)F(b) - F(a), which is why it never appears in a numeric answer.

Signed area versus total area

A definite integral counts area above the x-axis as positive and area below it as negative. Over one full period, ∫02πsin⁡x dx=0\int_0^{2\pi} \sin x\,dx = 0, even though the curve encloses a positive amount of area: the hump above the axis and the hollow below it cancel exactly. When a problem asks for the total area between a curve and the axis, find where the function changes sign, integrate each piece separately, and add the absolute values. For sin⁡x\sin x on [0,2π][0, 2\pi] that gives 2+2=42 + 2 = 4.

The same distinction appears in motion problems. Integrating velocity gives the net change in position, while integrating speed, the absolute value of velocity, gives the total distance travelled.

Reading the steps

Each step shows one transformation of the integral, with the rule or table entry in the title and the formula underneath. Linearity steps split the problem into smaller integrals that are solved one at a time and then recombined, so a long integrand produces a longer list of short steps rather than one big leap. When a substitution is used, the line that introduces uu also shows dudu, which is where you can see why the method applies. The last step always adds the constant of integration for an indefinite integral, or substitutes the limits for a definite one.

Common mistakes

  • Forgetting the constant of integration + C+\,C on indefinite integrals.
  • Using the power rule for ∫x−1dx\int x^{-1}dx; the answer is ln⁡∣x∣+C\ln|x| + C.
  • Not adjusting for the inner derivative: ∫cos⁡2x dx=12sin⁡2x+C\int \cos 2x\,dx = \frac12\sin 2x + C.
  • Integrating across a vertical asymptote, such as ∫−111x dx\int_{-1}^{1}\frac1x\,dx, as if it were an ordinary integral.
  • Forgetting to change or convert back the variable after a substitution.
  • Integrating a product as the product of the integrals; ∫xex dx\int x e^x\,dx is not x22ex\frac{x^2}{2}e^x.

Tips

  • Look for a function and its derivative appearing together; that signals substitution.
  • For by parts, choose uu as the factor that gets simpler when differentiated (LIATE order).
  • Check any antiderivative by differentiating it.
  • Check any antiderivative by differentiating it; you should get the integrand back exactly.
  • Look for the derivative of an inner function sitting in the integrand; it signals a substitution.
  • For integration by parts, choose uu using the order logarithm, inverse trig, algebraic, trig, exponential.

Frequently asked questions

What is the difference between definite and indefinite integrals?

An indefinite integral is a family of functions F(x)+CF(x) + C. A definite integral has limits and is a number: the signed area between the curve and the x-axis.

Which integration techniques are supported?

Linearity, power rule, standard table integrals, linear and general u-substitution, integration by parts (including repeated, tabular cases), and partial fractions for quadratic denominators.

Why is there a + C?

Every function whose derivative is ff differs by a constant, so the indefinite integral includes an arbitrary constant CC.

What happens if no antiderivative is found?

The calculator says so instead of guessing. If you give limits, it still computes the definite integral numerically with adaptive Simpson's rule and marks the answer as approximate.

Can I use pi as a limit?

Yes. Limits may be numbers or expressions such as pi, pi/2 or e.

Does it handle improper integrals?

Not yet. If the integrand is undefined or infinite inside the interval, the calculator reports that the integral is improper rather than returning a misleading number.

How do I choose u in integration by parts?

Pick the factor that becomes simpler when differentiated, usually a polynomial or a logarithm, and let dvdv be the factor that is easy to integrate. For ∫xex dx\int x e^x\,dx, take u=xu = x and dv=ex dxdv = e^x\,dx.

How do I know when to use substitution?

Look for a function inside another function whose derivative also appears as a factor. In ∫2xcos⁡(x2) dx\int 2x\cos(x^2)\,dx, the inner x2x^2 has derivative 2x2x, so u=x2u = x^2 works.

What is the integral of 1/(x^2 + 1)?

It is the inverse tangent: ∫1x2+1 dx=arctan⁡x+C\int \frac{1}{x^2 + 1}\,dx = \arctan x + C. The calculator recognises this standard form and the general 1a2+u2\frac{1}{a^2 + u^2} version.

Integrate your function

Enter a function above, with or without limits, to get the antiderivative, the technique used at each step and a numerical check.

More math calculators