practicecalculus
Powers, roots and rational functions

Integral of x: Formula, Derivation and Examples

The integral of x is x²/2 + C. See why with the reverse power rule and a triangle, plus definite integrals, the linear form ax + b and common mistakes.

Powers, roots and rational functions Updated 3 min read

At a glance

\int x\,dx = \frac{x^2}{2} + C
Antiderivative
\dfrac{x^2}{2} + C
Rule used
Reverse power rule with n = 1
Definite form
\int_0^b x\,dx = \dfrac{b^2}{2}
Symmetric interval
\int_{-a}^{a} x\,dx = 0
Check
\dfrac{d}{dx}\dfrac{x^2}{2} = x
On this page
  1. Graph of y = x and its antiderivative
  2. Derivation, step by step
  3. Check by differentiating
  4. Definite integrals
  5. The linear version: integral of ax + b
  6. Worked examples
  7. Common mistakes

The integral of x is \dfrac{x^2}{2} + C. It comes straight from the reverse power rule: add one to the exponent, then divide by the new exponent.

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

Graph of y = x and its antiderivative

Area under y = x from 0 to 2, with the antiderivative y = x²/2
The shaded triangle has base 2 and height 2, so its area is 2. The dashed curve y = \frac{x^2}{2} reaches exactly 2 at x = 2.

The antiderivative \frac{x^2}{2} is a parabola. Its slope at each point equals the height of the line y = x: slope 0 at the origin, slope 2 at x = 2, and negative slopes for negative x.

Derivation, step by step

  1. Write x as a power: x = x^1.
  2. Apply the reverse power rule, \int x^n\,dx = \frac{x^{n+1}}{n+1} + C, with n = 1.
  3. Add one to the exponent: x^{2}.
  4. Divide by the new exponent: \frac{x^2}{2}.
  5. Add the constant: \frac{x^2}{2} + C.

There is also a picture proof. The region under y = x from 0 to b is a right triangle with base b and height b, so its area is \frac{1}{2}b\cdot b = \frac{b^2}{2}. The area function is \frac{x^2}{2}, and that is exactly the antiderivative.

Check by differentiating

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

The forward direction is on the derivative of x page.

Definite integrals

\int_a^b x\,dx = \frac{b^2}{2} - \frac{a^2}{2} = \frac{b^2 - a^2}{2}

For example, \int_1^3 x\,dx = \frac{9 - 1}{2} = 4. That region is a trapezoid with parallel sides 1 and 3 and width 2, and its area is \frac{1 + 3}{2}\cdot 2 = 4. Same answer.

When the interval crosses 0, area below the axis counts as negative: \int_{-1}^{1} x\,dx = \frac{1}{2} - \frac{1}{2} = 0.

The linear version: integral of ax + b

For a line ax + b you can integrate term by term:

\int (ax + b)\,dx = \frac{ax^2}{2} + bx + C

With a u-substitution, u = ax + b, you get a second form:

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

Both are correct. Expanding the second gives \frac{ax^2}{2} + bx + \frac{b^2}{2a}, which differs from the first only by the constant \frac{b^2}{2a}.

Worked examples

Example 1. \int 6x\,dx = 6\cdot\frac{x^2}{2} + C = 3x^2 + C.

Example 2. \int (4x - 5)\,dx = 2x^2 - 5x + C. The -5 uses the integral of a constant.

Example 3. \int_0^4 \frac{x}{2}\,dx = \frac{1}{2}\cdot\frac{16}{2} = 4.

Example 4: average value. The average of f(x) = x on [0, 6] is \frac{1}{6}\int_0^6 x\,dx = \frac{1}{6}\cdot 18 = 3, the midpoint, as you would expect for a line.

Common mistakes

  1. Writing x^2 + C. You must divide by the new exponent. The derivative of x^2 is 2x, not x.
  2. Getting 1. That is the derivative of x, not its integral.
  3. Dropping + C on an indefinite integral.
  4. Expecting area to be positive. A definite integral gives signed area. Use \int\lvert x\rvert\,dx if you want total area; see the integral of |x|.

Keep going with the integral of x², or practice on antiderivative 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 is \frac{x^2}{2} + C. Check it: the derivative of \frac{x^2}{2} is \frac{2x}{2} = x.

What is the integral of 2x?

It is x^2 + C. Pull out the 2: 2\cdot\frac{x^2}{2} = x^2.

What is the integral of x from 0 to 1?

It is \frac{1^2}{2} - \frac{0^2}{2} = \frac{1}{2}. That is the area of a right triangle with legs 1 and 1.

Why is the integral of x from -1 to 1 equal to zero?

Because y = x is an odd function. The triangle below the axis on [-1, 0] has signed area -\frac{1}{2} and cancels the triangle above the axis on [0, 1].

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.