How to Evaluate Definite Integrals

A definite integral \int_a^b f(x)\,dx is a number: the signed area between the graph of f and the x-axis from x=a to x=b. To compute it by hand, you find an antiderivative and then evaluate it at the endpoints. You can check every example below with the integral calculator.

This article covers the four situations you will meet most often: the basic Fundamental Theorem method, substitution, symmetric limits, and functions with absolute values or several formulas. If you need a broader overview of integration techniques first, start with How to Solve Integrals Step by Step.

Using the Fundamental Theorem

The standard method rests on one statement. If F is an antiderivative of a continuous function f on [a,b], then:

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

We usually write this as:

\int_a^b f(x)\,dx = \Big[F(x)\Big]_a^b

For the theory behind this formula and why it works, see The Fundamental Theorem of Calculus.

The procedure has three steps:

  1. Find an antiderivative F(x) of the integrand.
  2. Substitute the upper limit, then the lower limit.
  3. Subtract: upper minus lower.

You do not add +C here. The constant cancels in F(b)-F(a), so any antiderivative works.

Example 1: a polynomial

Evaluate \int_0^2 (3x^2 - 4x + 1)\,dx.

An antiderivative is F(x) = x^3 - 2x^2 + x. Then:

\Big[x^3 - 2x^2 + x\Big]_0^2 = (8 - 8 + 2) - (0) = 2

Check: F'(x) = 3x^2 - 4x + 1, which is the integrand. The answer is 2.

Substitution in Definite Integrals

When the integrand has a function inside another function, substitution simplifies it. In a definite integral you have two options:

The first option is usually cleaner. The key rule is that the limits must change together with the variable.

Step What to do
1 Choose u = g(x)
2 Compute du = g'(x)\,dx
3 Convert both limits: u(a) = g(a) and u(b) = g(b)
4 Integrate in u and evaluate between the new limits

Example 2: substitution with new limits

Evaluate \int_0^1 x(x^2+1)^3\,dx.

Let u = x^2 + 1. Then du = 2x\,dx, so x\,dx = \tfrac12\,du.

The new limits are:

The integral becomes:

\frac12\int_1^2 u^3\,du = \frac12\left[\frac{u^4}{4}\right]_1^2 = \frac12\left(\frac{16}{4} - \frac14\right) = \frac12\cdot\frac{15}{4} = \frac{15}{8}

Check: the antiderivative in x is \frac{(x^2+1)^4}{8}. Its derivative is \frac{4(x^2+1)^3\cdot 2x}{8} = x(x^2+1)^3. Evaluating it directly gives \frac{16}{8} - \frac18 = \frac{15}{8}, the same result.

You can check this step by step in the integral calculator. Enter x*(x^2+1)^3 with limits 0 and 1.

Even and Odd Functions on Symmetric Limits

If the limits are -a and a, symmetry can save you work. A function is:

Type of f Result
Even \displaystyle\int_{-a}^{a} f(x)\,dx = 2\int_0^a f(x)\,dx
Odd \displaystyle\int_{-a}^{a} f(x)\,dx = 0

For odd functions, the area on the left of the y-axis cancels the area on the right. Products follow the same pattern as multiplication of signs: even times even is even, odd times odd is even, and even times odd is odd. For example, x\cos x is odd, so \int_{-\pi}^{\pi} x\cos x\,dx = 0 without any calculation.

This shortcut requires limits that are exactly symmetric around zero and a function that is continuous on the whole interval.

Example 3: splitting into odd and even parts

Evaluate \int_{-2}^{2} (x^3 + x^2)\,dx.

The term x^3 is odd, so its integral over [-2,2] is 0. The term x^2 is even:

\int_{-2}^{2} x^2\,dx = 2\int_0^2 x^2\,dx = 2\left[\frac{x^3}{3}\right]_0^2 = 2\cdot\frac83 = \frac{16}{3}

So the whole integral equals \frac{16}{3}.

Check directly: \left[\frac{x^4}{4} + \frac{x^3}{3}\right]_{-2}^{2} = \left(4 + \frac83\right) - \left(4 - \frac83\right) = \frac{16}{3}.

Absolute Values and Piecewise Functions

An antiderivative formula is valid only while the integrand is given by a single expression. If the integrand contains |x| or is defined by different formulas on different intervals, you must split the integral at the points where the formula changes and add the pieces.

For an absolute value, find where the expression inside is zero. On each side, |g(x)| equals either g(x) or -g(x).

Example 4: an absolute value

Evaluate \int_{-1}^{2} |x|\,dx.

The expression changes at x = 0. For x<0 we have |x| = -x, and for x\ge 0 we have |x| = x:

\int_{-1}^{2} |x|\,dx = \int_{-1}^{0} (-x)\,dx + \int_{0}^{2} x\,dx

Compute each part:

\int_{-1}^{0} (-x)\,dx = \left[-\frac{x^2}{2}\right]_{-1}^{0} = 0 - \left(-\frac12\right) = \frac12

\int_{0}^{2} x\,dx = \left[\frac{x^2}{2}\right]_{0}^{2} = 2

The total is \frac12 + 2 = \frac52. Geometrically, these are two triangles with areas \frac12 and 2.

Example 5: a piecewise function

Let f(x) = x^2 for 0 \le x \le 1 and f(x) = 2 - x for 1 < x \le 2. Evaluate \int_0^2 f(x)\,dx.

Split at x=1:

\int_0^1 x^2\,dx = \left[\frac{x^3}{3}\right]_0^1 = \frac13

\int_1^2 (2-x)\,dx = \left[2x - \frac{x^2}{2}\right]_1^2 = (4-2) - \left(2 - \frac12\right) = \frac12

The total is \frac13 + \frac12 = \frac56.

This function is continuous at x=1 because both formulas give 1 there. If a function has a jump or a vertical asymptote at the split point, the situation changes, and that is covered in Improper Integrals.

Common Mistakes

Forgetting to change the limits after substitution. In Example 2, if you switch to u but keep the limits 0 and 1, you get \frac12\left[\frac{u^4}{4}\right]_0^1 = \frac18. The correct answer is \frac{15}{8}. Either convert the limits or return to x before evaluating.

Subtracting in the wrong order. The formula is F(b) - F(a), upper minus lower. Reversing it flips the sign of the answer.

Applying the even/odd shortcut to non-symmetric limits. The rule \int_{-a}^a (\text{odd}) = 0 does not apply to \int_{-1}^{2} x^3\,dx. The limits must be -a and a.

Ignoring the absolute value. For \int_{-1}^{1} |x|\,dx, treating |x| as x gives 0. The correct value is 1, because the area is never negative here.

Integrating across a discontinuity. Consider \int_{-1}^{1} \frac{1}{x^2}\,dx. A naive calculation with F(x) = -\frac1x gives -1 - 1 = -2. This is wrong: the integrand is positive everywhere, and it blows up at x=0. The integral actually diverges. Always check that the integrand is continuous on [a,b]. If it is not, use the methods from Improper Integrals.

Confusing the integral with the area. A definite integral is signed: regions below the x-axis count as negative. If you need the actual area, split at the zeros of the function and take absolute values, or see Area Between Curves for the general case.

Summary

To evaluate a definite integral, find an antiderivative and compute F(b) - F(a). Use substitution with converted limits when the integrand has an inner function. Use symmetry on intervals like [-a, a]. Split the interval wherever an absolute value or a piecewise definition changes the formula. Then check the result by differentiating your antiderivative, or by running the same integral in the integral calculator to compare each step.