practicecalculus
Powers, roots and rational functions

Integral of a Constant and of 1: Formula and Examples

The integral of a constant k is kx + C, and the integral of 1 is x + C. See why, the area picture, definite integrals and the mistakes to avoid.

Powers, roots and rational functions Updated 3 min read

At a glance

\int k\,dx = kx + C
Antiderivative
kx + C
Integral of 1
\int 1\,dx = x + C
Integral of 0
\int 0\,dx = C
Definite integral
\int_a^b k\,dx = k(b - a)
Check
\dfrac{d}{dx}(kx + C) = k
On this page
  1. Graph: a constant gives a rectangle
  2. Why the integral of k is kx + C
  3. Check by differentiating
  4. Definite integrals of a constant
  5. Worked examples
  6. Common mistakes

The integral of a constant k is kx + C. In particular, the integral of 1 is x + C. It is the simplest integral in calculus, and almost every other integral uses it somewhere, usually as the last term of a polynomial.

\int k\,dx = kx + C, \qquad \int 1\,dx = \int dx = x + C

Graph: a constant gives a rectangle

Area under y = 3 from x = 0 to x = 2, with the antiderivative y = 3x
The shaded rectangle has height 3 and width 2, so its area is 6. The dashed line y = 3x is the antiderivative: it rises by exactly 6 between x = 0 and x = 2.

The area under a horizontal line is always a rectangle. Its height is k and its width is how far x has moved, so the accumulated area grows like kx. That is the whole formula in one picture.

Why the integral of k is kx + C

An integral asks: what function has this derivative? We want a function whose slope is k everywhere. A straight line with slope k does exactly that:

\frac{d}{dx}(kx) = k

Adding any constant C moves the line up or down without changing its slope, so every function kx + C works. You can also see it as the reverse power rule with n = 0: since k = kx^0,

\int kx^0\,dx = k\cdot\frac{x^{1}}{1} + C = kx + C

Check by differentiating

Always check an antiderivative by taking its derivative:

\frac{d}{dx}\left(kx + C\right) = k + 0 = k \checkmark

The matching derivative page is the derivative of a constant, which runs the same idea backwards: the derivative of any constant is 0.

Definite integrals of a constant

With the Fundamental Theorem of Calculus:

\int_a^b k\,dx = \Big[kx\Big]_a^b = kb - ka = k(b - a)

If k is negative, the rectangle sits below the axis and the answer is negative. For example, \int_0^4 (-2)\,dx = -8.

Worked examples

Example 1. \int 7\,dx = 7x + C.

Example 2: constants that look like variables. Any number without x counts as a constant, even if it is written with a symbol:

\int \pi\,dx = \pi x + C, \qquad \int e^2\,dx = e^2 x + C, \qquad \int \ln 5\,dx = x\ln 5 + C

Example 3: inside a polynomial. Using the linearity rules:

\int (6x^2 - 4x + 9)\,dx = 2x^3 - 2x^2 + 9x + C

The 9 becomes 9x. See the integral of x and the integral of x² for the other two terms.

Example 4: a different variable. \int 3\,dt = 3t + C. The variable in the answer matches the variable in dt.

Example 5: a definite integral. \int_{-1}^{4} 3\,dx = 3\big(4 - (-1)\big) = 15.

Common mistakes

  1. Integrating a constant to 0. That is the derivative rule. Integration goes the other way: \int 5\,dx = 5x + C, not 0.
  2. Writing 5 + C. The answer must contain x. Check: the derivative of 5 + C is 0, not 5.
  3. Forgetting + C. Without it you only have one antiderivative, not all of them.
  4. Treating e^2 or \pi^2 as a power of x. These are plain numbers. \int e^2\,dx is e^2x + C, not \frac{e^3}{3}.

Want more practice? Try the antiderivative practice problems or read the guide to antiderivatives.

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 1?

The integral of 1 is x + C. Written on its own, \int dx means the same thing and also equals x + C.

What is the integral of a constant k?

It is kx + C. Check it by differentiating: the derivative of kx is k and the derivative of C is 0.

What is the integral of 0?

It is an arbitrary constant C. Every constant function has derivative 0, so the antiderivative of 0 is any constant.

What is the integral of 5 from 2 to 7?

It is 5(7 - 2) = 25, the area of a 5 by 5 rectangle.

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.