Tutorials › Calculus I › Integrals Of Constant Functions

Integral Properties and Estimates · Tutorial 980 of 1495

Integrals Of Constant Functions

Derive and use the constant-integrand formula, taking care to respect the order of the endpoints.

Intermediate 9 min read

What You'll Learn

  • State the domain condition for integrating a constant function between two endpoints
  • Derive the formula for an increasing interval directly from tagged Riemann sums
  • Extend the formula to reversed endpoints using signed orientation
  • Evaluate integrals with positive, negative, and zero constant values
  • Check results by tracking the oriented interval length
  • Identify and correct endpoint-order errors

The Integral of a Constant

A constant function has the same value at every point of its domain. Its integral over an interval is therefore a particularly direct application of the definition of the Riemann integral: each subinterval contributes the constant value multiplied by that subinterval’s width.

The order of the endpoints matters. The interval length used in the formula is the oriented length, \(b-a\), not the nonnegative distance between the endpoints. This distinction handles reversed endpoints and negative constants without changing the formula.

Definition: Let \(I\) be an interval and let \(c\in\mathbb{R}\). The constant function with value \(c\) on \(I\) is the function \(f:I\to\mathbb{R}\) defined by \(f(x)=c\) for every \(x\in I\).

To use the integral formula, the function must be defined throughout the interval between the endpoints. Thus, if \(f(x)=c\) on \(I\), we require \(a,b\in I\). Because \(I\) is an interval, this ensures that every point between \(a\) and \(b\) lies in its domain. Without this condition, the integral may not be defined.

The Constant-Integrand Formula

For a constant function defined on an interval containing \(a\) and \(b\), the integral is the constant value multiplied by the oriented interval length:

Theorem: If \(f(x)=c\) on an interval \(I\) containing \(a\) and \(b\), then
$$ \int_a^b f(x)\,dx = \int_a^b c\,dx = c(b-a). $$

The expression \(b-a\) records both the size and direction of the interval. When \(a<b\), it is positive; when \(b<a\), it is negative; and when \(a=b\), it is zero. The same formula applies in all three cases.

Why the Formula Works

First suppose \(a<b\). A tagged partition of \([a,b]\) consists of points \(a=x_0<x_1<\cdots<x_n=b\), together with a sample point \(\xi_i\in[x_{i-1},x_i]\) for each subinterval. The width of the \(i\)-th subinterval is \(\Delta x_i=x_i-x_{i-1}\). The corresponding Riemann sum is

$$ \sum_{i=1}^{n} f(\xi_i)\Delta x_i. $$

Since \(f\) has the constant value \(c\), the choice of each sample point makes no difference: \(f(\xi_i)=c\). Therefore every tagged Riemann sum, for every partition, has the same value:

$$ \sum_{i=1}^{n} f(\xi_i)\Delta x_i = \sum_{i=1}^{n} c(x_i-x_{i-1}) = c\sum_{i=1}^{n}(x_i-x_{i-1}). $$

The sum of the subinterval widths telescopes: each interior partition point occurs once with a positive sign and once with a negative sign. Hence

$$ \sum_{i=1}^{n}(x_i-x_{i-1}) = (x_1-x_0)+(x_2-x_1)+\cdots+(x_n-x_{n-1}) = x_n-x_0 = b-a. $$

It follows that every tagged Riemann sum equals \(c(b-a)\). In particular, as the partition mesh shrinks, the Riemann sums converge to \(c(b-a)\), so the Riemann integral exists and has that value. This argument works for any real \(c\), including \(c=0\) and negative \(c\).

For reversed endpoints, the signed-orientation convention gives \(\int_a^b f(x)\,dx=-\int_b^a f(x)\,dx\) when \(b<a\). Applying the result just proved to the increasing interval from \(b\) to \(a\) yields

$$ \int_a^b c\,dx = -\int_b^a c\,dx = -c(a-b) = c(b-a). $$

If \(a=b\), the zero-length-interval rule gives \(\int_a^a c\,dx=0=c(a-a)\). Together, these cases establish the formula for every permitted pair of endpoints.

Worked Examples

Worked Example: A Positive Constant on an Increasing Interval

Evaluate \(\int_{-2}^{4} 7\,dx\). The constant function \(f(x)=7\) must be defined on an interval containing \([-2,4]\). The endpoints are in increasing order, so the oriented interval length is \(4-(-2)\):

$$ \begin{aligned} \int_{-2}^{4} 7\,dx &=7\bigl(4-(-2)\bigr)\\ &=7(4+2)\\ &=7\cdot 6\\ &=42. \end{aligned} $$

Check: The interval length is \(6\), and multiplying it by the constant value \(7\) gives \(42\), as in the formula. Equivalently, every tagged Riemann sum has the form \(7\sum_i\Delta x_i=7\cdot6=42\).

Worked Example: A Negative Constant on an Increasing Interval

Evaluate \(\int_{1}^{5}(-3)\,dx\). The constant function \(f(x)=-3\) is defined throughout an interval containing \([1,5]\). The endpoint difference is \(5-1=4\):

$$ \begin{aligned} \int_1^5 (-3)\,dx &=(-3)(5-1)\\ &=(-3)\cdot4\\ &=-12. \end{aligned} $$

Check: Each subinterval contributes \((-3)\Delta x_i\), so their sum is \((-3)\sum_i\Delta x_i=(-3)\cdot4=-12\). The negative constant remains negative when multiplied by this positive interval length.

Worked Example: A Negative Constant with Reversed Endpoints

Evaluate \(\int_{6}^{2}(-4)\,dx\), assuming the constant function \(f(x)=-4\) is defined on an interval containing \([2,6]\). Keep the endpoints in the order given: the oriented interval length is \(2-6=-4\).

$$ \begin{aligned} \int_6^2 (-4)\,dx &=(-4)(2-6)\\ &=(-4)(-4)\\ &=16. \end{aligned} $$

Check: Reversing the bounds gives \(\int_6^2(-4)\,dx=-\int_2^6(-4)\,dx\). The increasing-endpoint integral is \((-4)(6-2)=-16\), and its negative is \(16\), matching the direct calculation.

Worked Example: Equal Endpoints

Evaluate \(\int_{3}^{3}12\,dx\), with the constant function \(f(x)=12\) defined on an interval containing \(3\). The endpoint difference is zero:

$$ \begin{aligned} \int_3^3 12\,dx &=12(3-3)\\ &=12\cdot0\\ &=0. \end{aligned} $$

Check: The interval has zero length, so the zero-length-interval rule gives \(\int_3^3 12\,dx=0\). This agrees with the formula.

Keeping Track of Endpoint Order

The most reliable way to avoid sign errors is to write the endpoint difference as \(b-a\) exactly as it appears in the formula. Do not replace it by the distance between the endpoints. The distance is nonnegative, whereas the oriented length records whether the bounds are in increasing or decreasing order.

The constant \(c\) and the oriented length \(b-a\) are separate factors. Either factor can be negative. If both are negative, their product is positive; if exactly one is negative, their product is negative. This is simply the sign arithmetic in \(c(b-a)\), not a reason to change the formula.

Common mistake: Replacing \(b-a\) with the positive distance between endpoints loses the sign required by signed orientation. Keep the endpoints in their original order when forming \(b-a\).

For example, the incorrect calculation \(\int_5^2 3\,dx=3(5-2)=9\) uses the distance \(5-2\) instead of the oriented difference. The upper endpoint is \(b=2\), and the lower endpoint is \(a=5\), so the correct calculation is

$$ \int_5^2 3\,dx = 3(2-5) = 3(-3) = -9. $$

Check: By signed orientation, \(\int_5^2 3\,dx=-\int_2^5 3\,dx\). The integral with increasing endpoints is \(3(5-2)=9\), so reversing its bounds gives \(-9\), as required.

Using the Formula Reliably

For a constant-integrand integral, identify the constant and preserve the endpoint order. Then multiply the constant by the upper endpoint minus the lower endpoint. Before accepting the result, check that the constant function is defined throughout the interval between the endpoints and recompute the endpoint difference with its sign.

1
Confirm the domain.
Check that the constant function is defined on an interval containing both endpoints, and therefore the whole interval between them.
2
Identify the constant and endpoints.
For \(\int_a^b c\,dx\), the constant is \(c\), the lower endpoint is \(a\), and the upper endpoint is \(b\).
3
Form the oriented length.
Calculate \(b-a\) in the written order; do not replace it with an absolute value.
4
Multiply and check.
Evaluate \(c(b-a)\), then check the endpoint order and sign of the product.

This method is useful because it turns a whole class of integral calculations into one exact formula. The derivation also explains why no choice of sample points or finer partition can change the answer: every subinterval uses the same function value, and the subinterval widths add to the total oriented length.

Check Your Understanding

Use the formula \(\int_a^b c\,dx=c(b-a)\), making sure the constant function is defined throughout the interval between the endpoints.

  1. Evaluate \(\int_{-1}^{3} 5\,dx\).
  2. Evaluate \(\int_2^7 (-2)\,dx\).
  3. Evaluate \(\int_4^1 6\,dx\).
  4. Evaluate \(\int_{-3}^{-3}(-8)\,dx\).
  5. In one or two sentences, explain why every tagged Riemann sum for a constant function on an increasing interval has the same value.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon