practicecalculus
Powers, roots and rational functions

Integral of x²: Formula, Derivation and Examples

The integral of x² is x³/3 + C. See the reverse power rule, a Riemann sum proof, definite integrals, the (ax + b)² form and the mistakes students make.

Powers, roots and rational functions Updated 2 min read

At a glance

\int x^2\,dx = \frac{x^3}{3} + C
Antiderivative
\dfrac{x^3}{3} + C
Rule used
Reverse power rule with n = 2
Area from 0 to b
\dfrac{b^3}{3}
Area from 0 to 1
\dfrac{1}{3}
Check
\dfrac{d}{dx}\dfrac{x^3}{3} = x^2
On this page
  1. Graph: the area under y = x²
  2. Derivation with the reverse power rule
  3. A proof from Riemann sums
  4. Check by differentiating
  5. Substitution variant: integral of (ax + b)²
  6. Worked examples
  7. Common mistakes

The integral of x^2 is \dfrac{x^3}{3} + C. Add one to the exponent and divide by the new exponent.

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

Graph: the area under y = x²

Area under y = x² from 0 to 2, with the antiderivative y = x³/3
The shaded area is \frac{2^3}{3} = \frac{8}{3} \approx 2.67. The dashed antiderivative y = \frac{x^3}{3} passes through \left(2, \frac{8}{3}\right).

Notice that the antiderivative is flat at x = 0 (where x^2 = 0) and never decreases, because x^2 is never negative.

Derivation with the reverse power rule

  1. Start from the reverse power rule: \int x^n\,dx = \frac{x^{n+1}}{n+1} + C for n \ne -1.
  2. Set n = 2: the new exponent is 3.
  3. Divide by 3: \frac{x^3}{3}.
  4. Add C.

A proof from Riemann sums

You can also find the area under x^2 from 0 to b without knowing any antiderivative. Split [0, b] into n strips of width \frac{b}{n} and use right endpoints x_i = \frac{bi}{n}:

\sum_{i=1}^{n}\left(\frac{bi}{n}\right)^2\frac{b}{n} = \frac{b^3}{n^3}\sum_{i=1}^{n} i^2 = \frac{b^3}{n^3}\cdot\frac{n(n+1)(2n+1)}{6}

As n \to \infty, the fraction \frac{n(n+1)(2n+1)}{6n^3} tends to \frac{2}{6} = \frac{1}{3}, so the area is \frac{b^3}{3}. That matches the antiderivative. This is the same computation Archimedes did for the parabola, and you can practise it on the Riemann sums guide.

Check by differentiating

\frac{d}{dx}\left(\frac{x^3}{3} + C\right) = \frac{3x^2}{3} = x^2 \checkmark

See also the derivative of x².

Substitution variant: integral of (ax + b)²

With u = ax + b and du = a\,dx:

\int (ax + b)^2\,dx = \frac{1}{a}\int u^2\,du = \frac{(ax + b)^3}{3a} + C

For example, \int (2x + 1)^2\,dx = \frac{(2x + 1)^3}{6} + C. Check: the derivative is \frac{3(2x+1)^2\cdot 2}{6} = (2x + 1)^2.

The same idea handles an extra factor of x: \int x(x^2 + 1)^2\,dx = \frac{(x^2 + 1)^3}{6} + C, using u = x^2 + 1. More on this on the u-substitution rule page.

Worked examples

Example 1. \int_1^3 x^2\,dx = \frac{27}{3} - \frac{1}{3} = \frac{26}{3}.

Example 2. \int (x^2 + 3x - 2)\,dx = \frac{x^3}{3} + \frac{3x^2}{2} - 2x + C.

Example 3. \int_{-2}^{2} x^2\,dx = \frac{8}{3} - \left(-\frac{8}{3}\right) = \frac{16}{3}. Since x^2 is even, this is twice \int_0^2 x^2\,dx.

Example 4: volume. Spinning y = x around the x-axis on [0, h] gives a cone with volume \pi\int_0^h x^2\,dx = \frac{\pi h^3}{3}, the familiar \frac{1}{3}\pi r^2 h with r = h.

Common mistakes

  1. Writing 2x. That is the derivative, not the integral.
  2. Forgetting to divide by 3. x^3 has derivative 3x^2, not x^2.
  3. Integrating (2x + 1)^2 as \frac{(2x+1)^3}{3}. You must also divide by the inside derivative, 2.
  4. Squaring the integral of x. Integrals do not distribute over products.

Practice with the antiderivative problems and definite integral problems.

Practice it now

The reverse power rule

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the integral of x²?

The integral of x^2 is \frac{x^3}{3} + C. Raise the exponent from 2 to 3, then divide by 3.

What is the integral of x² from 0 to 1?

It is \frac{1^3}{3} - 0 = \frac{1}{3}.

What is the integral of 3x²?

It is x^3 + C, because 3\cdot\frac{x^3}{3} = x^3.

Is the integral of x² the same as (integral of x)²?

No. \left(\frac{x^2}{2}\right)^2 = \frac{x^4}{4}, which is not \frac{x^3}{3}. You cannot square the integral of x to get the integral of x^2.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.