Integral Calculator — Antiderivative & Definite Integral (Free)

CalculusFreeNo sign-up

An integral calculator finds an antiderivative F(x) whose derivative is the function you enter, then uses it for definite integrals. For example, ∫ x sin x dx = sin x − x cos x + C by integration by parts, and the definite integral from 0 to π is F(π) − F(0) = π ≈ 3.14159.

Integral calculator with steps
Reads as∫π0x sin(x) dx
Leave both limits empty for the antiderivative (indefinite integral). Type x^3 for x³, 2x for 2·x, sqrt(x), e^x, ln(x), sin(x), arctan(x), 1/(x^2+1). Limits can be numbers, pi or e.
Try:
Definite integral
∫π0x sin(x) dx = π ≈ 3.1415927
Antiderivative F(x)sin(x) − x cos(x) + C
Numerical check (Simpson)≈ 3.1415927
−11234−22
f(x) = x sin(x)area above the axis counts +area below counts −
Show steps
  1. Integration by parts: ∫ u dv = uv − ∫ v duTake u = x (it gets simpler when differentiated) and dv = sin(x) dx. Then du = 1 dx and v = −cos(x).
  2. Constant multiple rule∫ −cos(x) dx = (−1)·∫ cos(x) dx
  3. Standard integral: ∫ cos u du = sin u∫ cos(x) dx = sin(x)
  4. Combine: uv − ∫ v du∫ x sin(x) dx = sin(x) − x cos(x)
  5. Add the constant of integration∫ x sin(x) dx = sin(x) − x cos(x) + C
  6. Check by differentiatingd/dx[sin(x) − x cos(x) + C] = x sin(x) = f(x) ✓
  7. Fundamental theorem of calculusF(b) − F(a) = [sin(x) − x cos(x)] from 0 to π = π ≈ 3.1415927

Related: derivative calculator · Riemann sums · Simpson’s rule calculator

Integral Calculator — Antiderivative & Definite Integral (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the integral calculator

  1. Type the function after “Integrate f(x) =”, for example x^2 e^x or 1/(x^2 - 1). Leave out the ∫ sign and the dx.
  2. For an antiderivative (indefinite integral), leave both limits empty. For a definite integral, enter the lower limit a and the upper limit b. Numbers, pi and e are fine.
  3. Choose a different variable (t, u, y, z) if your problem uses one. Choose “Numeric” to get only an adaptive Simpson’s rule value.
  4. Read the answer, then open “Show steps”. Each step names its technique: power rule, u-substitution, integration by parts, partial fractions or a trig identity.
  5. Optional: type your own antiderivative under “Check your answer”. The calculator differentiates it and compares it with f(x), so an answer that differs by a constant is accepted.

The power rule and other basic integration rules

The power rule for integrals undoes the power rule for derivatives: ∫ xⁿ dx = xⁿ⁺¹/(n + 1) + C for every n except −1. For n = −1 the answer is ∫ 1/x dx = ln|x| + C. Integrals also split over sums and let constants come out front, so a polynomial is integrated term by term:

∫ (6x² − 4x + 5) dx = 2x³ − 2x² + 5x + C.

The + C matters. Every function has infinitely many antiderivatives, one for each constant, because the derivative of a constant is 0.

Function f(x) Antiderivative ∫ f(x) dx
xⁿ (n ≠ −1) xⁿ⁺¹/(n + 1) + C
1/x ln|x| + C
eˣ eˣ + C
aˣ aˣ/ln a + C
sin x −cos x + C
cos x sin x + C
sec² x tan x + C
tan x −ln|cos x| + C
1/(1 + x²) arctan x + C
1/√(1 − x²) arcsin x + C
ln x x ln x − x + C

When the inside is linear, such as sin(3x) or (2x + 3)⁵, divide by the inside’s slope: ∫ sin(3x) dx = −cos(3x)/3 + C.

Integration techniques, with worked examples

u-substitution reverses the chain rule. Look for a function and its derivative in the same integral. In ∫ x e^(x²) dx, let u = x², so du = 2x dx and x dx = du/2. The integral becomes ½∫ eᵘ du = ½eᵘ + C = e^(x²)/2 + C.

Integration by parts reverses the product rule: ∫ u dv = uv − ∫ v du. Choose u as the part that gets simpler when you differentiate it. For ∫ x sin x dx, take u = x and dv = sin x dx, so du = dx and v = −cos x. Then ∫ x sin x dx = −x cos x + ∫ cos x dx = sin x − x cos x + C. For x² eˣ you apply it twice and get x²eˣ − 2xeˣ + 2eˣ + C. With a logarithm, choose u = ln x: ∫ x ln x dx = (x² ln x)/2 − x²/4 + C.

Partial fractions split a rational function into simple pieces. Since x² − 1 = (x − 1)(x + 1),

1/(x² − 1) = ½·1/(x − 1) − ½·1/(x + 1), so ∫ 1/(x² − 1) dx = ½ln|x − 1| − ½ln|x + 1| + C.

If the top has degree at least the bottom’s, the calculator does polynomial long division first.

Trig identities handle powers of sine and cosine. The power-reduction identity sin² x = (1 − cos 2x)/2 gives ∫ sin² x dx = x/2 − sin(2x)/4 + C. For odd powers, keep one factor and rewrite the rest with sin² x = 1 − cos² x, then substitute u = cos x.

Definite integrals and the fundamental theorem of calculus

If F is an antiderivative of f, then ∫ₐᵇ f(x) dx = F(b) − F(a). The constant C cancels, so you can ignore it. For example, ∫₀² (3x² + 1) dx = [x³ + x] from 0 to 2 = (8 + 2) − 0 = 10. In the same way, ∫₀^π x sin x dx = (sin π − π cos π) − (sin 0 − 0) = π.

A definite integral is a signed area. Area above the x-axis counts as positive and area below counts as negative, which is why ∫₀^{2π} sin x dx = 0. The total shaded area, ∫₀^{2π} |sin x| dx, is 4. When the two differ, the calculator shows both values. The graph shades positive area in green and negative area in orange. Swapping the limits changes the sign: ∫₃⁰ x² dx = −9.

When there is no closed form: numerical integration

Some simple-looking functions have no antiderivative made of elementary functions. Examples are e^(−x²) (its antiderivative is the error function), sin x/x and e^(x²). The calculator says so plainly instead of guessing. For a definite integral it then uses adaptive Simpson’s rule. That method fits parabolas through the curve and keeps halving the pieces until the error estimate is tiny. For example, ∫₋₁¹ e^(−x²) dx ≈ 1.493648. Every exact answer is also checked against this numerical value.

The calculator also checks for improper integrals, where the function blows up inside the interval or at an endpoint. ∫₀¹ 1/√x dx converges to 2, because 2√x has a finite value at 0. ∫₋₁¹ 1/x² dx diverges, because the area near x = 0 is infinite. Simply plugging −1/x into F(b) − F(a) gives −2, which is wrong.

Common integration mistakes

Mistake Wrong Right
Forgetting + C ∫ 2x dx = x² x² + C
Power rule on 1/x ∫ x⁻¹ dx = x⁰/0 ln|x| + C
Ignoring the inner slope ∫ e^(3x) dx = e^(3x) e^(3x)/3 + C
Integrating a product factor by factor ∫ x eˣ dx = (x²/2)eˣ xeˣ − eˣ + C (by parts)
Using F(b) − F(a) across a vertical asymptote ∫₋₁¹ dx/x² = −2 diverges

Using the calculator for homework

Work the integral by hand first, then compare. To check your answer, differentiate it: if you get back the integrand, it is right, even if it looks different from the calculator’s form (answers can differ by a constant). The “Check your answer” box does this for you. If your answer is wrong, find the first step where your work and the calculator’s steps disagree. Usually that is the choice of u, a sign, or a missing factor from the inner derivative.

Integrals practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is ∫ 4x³ dx?

Found a mistake? Let us know!

2. What is ∫ (3x² − 2x + 1) dx?

Found a mistake? Let us know!

3. What is ∫ e^(5x) dx?

Found a mistake? Let us know!

4. What is ∫ cos(2x) dx?

Found a mistake? Let us know!

5. Using u = x² + 1, what is ∫ 2x(x² + 1)³ dx?

Found a mistake? Let us know!

6. Integration by parts gives ∫ x eˣ dx = ?

Found a mistake? Let us know!

7. What is ∫ 1/x dx (for x ≠ 0)?

Found a mistake? Let us know!

8. Evaluate ∫₀³ x² dx.

Found a mistake? Let us know!

9. Evaluate ∫₀^π sin x dx.

Found a mistake? Let us know!

10. What is ∫₁^e (1/x) dx?

Found a mistake? Let us know!

Frequently asked questions

What is integral calculus?

Integral calculus studies accumulation: total change, area under a curve, and antiderivatives. An antiderivative reverses differentiation. For example, ∫ 2x dx = x² + C, because the derivative of x² is 2x.

How do you find a definite integral?

Find an antiderivative F, then compute F(b) − F(a). For ∫₀² (3x² + 1) dx, the antiderivative is x³ + x. At x = 2 it equals 10 and at x = 0 it equals 0, so the integral is 10.

How do you integrate on a TI-84 calculator?

Press MATH and choose fnInt( (option 9). Enter the function, the variable and the two limits. For example, fnInt(X², X, 0, 3) returns 9. The TI-84 gives a numerical value only. It cannot find an antiderivative, so use this page when you need the formula and the steps.

Can calculators integrate?

Most graphing calculators approximate definite integrals numerically. ∫₀^π sin x dx, for example, comes out as 2. Computer algebra systems, and this page, can also find antiderivatives symbolically. No program can integrate every function in closed form, because some, like e^(−x²), have no elementary antiderivative.

Is integral calculus Calc 1 or Calc 2?

Both. Calculus 1 (and AP Calculus AB) introduces antiderivatives, basic u-substitution, Riemann sums and the fundamental theorem. Calculus 2 (AP Calculus BC) adds integration by parts, partial fractions, trig integrals, improper integrals and series.

How do you integrate without limits?

An integral without limits is an indefinite integral: the answer is a family of functions plus C. For example, ∫ (6x² − 4x + 5) dx = 2x³ − 2x² + 5x + C. Check it by differentiating: 6x² − 4x + 5.

Related calculators

More calculus calculators

Browse all 206 calculators

Related to This Article

What people say about "Integral Calculator: Antiderivatives & Definite, Steps"?

No one replied yet.

Leave a Reply