Integral Calculator

The tool below computes an integral — either an indefinite integral (antiderivative + C) or a definite integral evaluated between two bounds. Enter the integrand and the calculator picks the right technique and shows the work.

Type naturally or click ⌨ in the box to use the math keyboard. For an indefinite integral use \int f(x)\,dx; for a definite integral add bounds: \int_{a}^{b} f(x)\,dx.

\int_{0}^{1} x^2 , dx

LaTeX:

An integral computes the accumulated effect of a function — either as an antiderivative (indefinite) or as the signed area under a curve between two bounds (definite). For example, \(\int x^2 , dx = \dfrac{x^3}{3} + C\), and \(\int_0^1 x^2 , dx = \dfrac{1}{3}\).

Worked Examples

Three examples worked by hand — the same logic the calculator uses, just spelled out so you can follow it on paper.

Example 1: Power rule — evaluate \(\int x^4 , dx\)

The power rule for integration is \(\int x^n , dx = \dfrac{x^{n+1}}{n+1} + C\) for \(n \neq -1\). Add 1 to the exponent, divide by the new exponent, then add the constant:

\[\int x^4 , dx = \dfrac{x^5}{5} + C\]

Check by differentiating: \(\dfrac{d}{dx}\left(\dfrac{x^5}{5}\right) = \dfrac{5x^4}{5} = x^4\). ✓

Example 2: Substitution — evaluate \(\int 2x \cos(x^2) , dx\)

The integrand has a function \(\cos(\cdot)\) wrapped around \(x^2\), and the \(2x\) out front is exactly the derivative of \(x^2\). That's the substitution signal.

Let \(u = x^2\), so \(du = 2x , dx\). Substitute:

\[\int 2x \cos(x^2) , dx = \int \cos(u) , du = \sin(u) + C = \sin(x^2) + C\]

Example 3: Definite integral — evaluate \(\int_0^2 (3x^2 + 1) , dx\)

Step 1: Find the antiderivative.

\[\int (3x^2 + 1) , dx = x^3 + x + C\]

Step 2: Evaluate at the upper bound and subtract the value at the lower bound (the Fundamental Theorem of Calculus):

\[\bigl[x^3 + x\bigr]_0^2 = (8 + 2) - (0 + 0) = 10\]

Definite integrals produce a number, not a function. The "+ C" cancels out in the subtraction.

Indefinite vs. Definite Integrals

An indefinite integral asks for an antiderivative — a function whose derivative is the integrand. Because the derivative of a constant is zero, indefinite integrals always include "+ C," the constant of integration:

\[\int x^2 , dx = \frac{x^3}{3} + C\]

A definite integral evaluates the antiderivative at two specific bounds and subtracts. The result is a number, not a function, and there's no "+ C":

\[\int_{0}^{1} x^2 , dx = \left[\frac{x^3}{3}\right]_0^1 = \frac{1}{3} - 0 = \frac{1}{3}\]

If you only want an antiderivative (no bounds), the Antiderivative Calculator is dedicated to that case.

Try These Examples

  • \int x^2 \, dx — power rule
  • \int \sin(x) \, dx — basic trig
  • \int e^x \, dx — exponential
  • \int \frac{1}{x} \, dx — natural log
  • \int_{0}^{1} x^2 \, dx — definite integral
  • \int 2x \cdot e^{x^2} \, dx — substitution
  • \int x \cdot e^x \, dx — integration by parts

Common Integration Techniques

A quick reference for the techniques this calculator uses:

Method When to use
Power rule \(\int x^n , dx = \dfrac{x^{n+1}}{n+1} + C\) (for \(n \neq -1\))
\(u\)-substitution A piece of the integrand is the derivative of another piece
Integration by parts \(\int u , dv = uv - \int v , du\) — for products like \(x e^x\)
Partial fractions Rational functions where the denominator factors
Trig substitution Expressions like \(\sqrt{a^2 - x^2}\), \(\sqrt{a^2 + x^2}\), \(\sqrt{x^2 - a^2}\)
Trig identities Powers of sine and cosine, products of trig functions

For definite integrals, after finding the antiderivative, evaluate at the upper bound and subtract the value at the lower bound — the Fundamental Theorem of Calculus.

Tips for Using the Calculator

  • For indefinite integrals, type \int f(x) \, dx — the \, adds a small space before dx
  • For definite integrals, add bounds: \int_{0}^{1} f(x) \, dx
  • For powers, use ^: x^3 means \(x^3\)
  • For fractions, use \frac{a}{b} or just a/b
  • The virtual math keyboard has an ∫ button for one-click integral entry

Frequently Asked Questions

What does an integral represent geometrically?

A definite integral \(\int_a^b f(x) , dx\) is the signed area between the curve \(y = f(x)\) and the x-axis, from \(x = a\) to \(x = b\). "Signed" means area below the x-axis counts as negative. An indefinite integral has no geometric area attached — it's a family of antiderivatives.

Why is there always a "+ C" in indefinite integrals?

The derivative of any constant is zero, so adding a constant to an antiderivative doesn't change its derivative. Every function has infinitely many antiderivatives differing by a constant. The "+ C" captures all of them at once.

When do I use substitution vs. integration by parts?

Use substitution when one part of the integrand is the derivative of another part — like \(2x\) and \(x^2\). Use integration by parts when the integrand is a product of two functions that aren't related by differentiation, like \(x \cdot e^x\) or \(x \cdot \sin(x)\).

Can every function be integrated?

Every continuous function has an antiderivative, but not every antiderivative can be written using elementary functions (polynomials, exponentials, trig, etc.). For example, \(\int e^{-x^2} , dx\) has no closed-form elementary expression — that's why it's defined as a special function (the error function).

What's the Fundamental Theorem of Calculus?

It links differentiation and integration: if \(F(x)\) is an antiderivative of \(f(x)\), then \(\int_a^b f(x) , dx = F(b) - F(a)\). That's the rule we use to evaluate definite integrals — find an antiderivative, plug in the bounds, subtract.