Tutorials › Calculus I › Partitioning at Piecewise-Function Breakpoints

Riemann Sums and the Integral · Tutorial 960 of 1495

Partitioning at Piecewise-Function Breakpoints

Partition at every formula change so each piece can be integrated on its own interval and the contributions combined correctly.

Intermediate 10 min read

What You'll Learn

  • Identify breakpoints and form a partition that contains them.
  • State the regularity conditions needed for a bounded piecewise-defined function to be Riemann integrable.
  • Explain why the integral is the sum of the integrals on the pieces.
  • Compute piece contributions on their correct intervals.
  • Detect and correct errors caused by using one formula across a breakpoint.

Why Breakpoints Belong in the Partition

A piecewise-defined function may follow one formula on one interval and a different formula on another. If a partition interval crosses a point where the formula changes, calculations on that interval can mix two different pieces. Including every breakpoint in the partition separates the intervals so each lies within a single piece.

This is useful both for understanding the Riemann integral and for evaluating it. The method is not simply “integrate each formula”: one must first check that the function is integrable and then use the correct interval for each formula.

Breakpoints, Partitions, and Piecewise Functions

A breakpoint is a point where the rule used to define a piecewise function changes. A breakpoint need not be a discontinuity: the formulas on its two sides may meet at the same value. Conversely, the function may jump there.

A partition of \([a,b]\) is a finite increasing list of points \(a=x_0<x_1<\cdots<x_n=b\). Its subintervals are \([x_{i-1},x_i]\), and its mesh is the largest subinterval length, \(\max_i(x_i-x_{i-1})\). To partition at breakpoints means to include each one among the partition points.

For example, if a function changes formula at \(c\), where \(a<c<b\), a partition that includes the breakpoint has at least the points \(a,c,b\). The subintervals \([a,c]\) and \([c,b]\) then correspond to the two pieces, rather than crossing the formula change.

Definition: A function on \([a,b]\) is piecewise continuous in the sense used here if there are finitely many breakpoints \(a=c_0<c_1<\cdots<c_m=b\) such that, on each open interval \((c_{i-1},c_i)\), the defining piece agrees with a function that has a continuous extension to \([c_{i-1},c_i]\). The function is also assumed bounded on \([a,b]\); its values at the finitely many breakpoints are finite.

The continuous extensions describe the pieces up to their endpoints. The actual function may assign a breakpoint a value different from either extension. This causes no problem for the result below, but the regularity condition matters: finitely many breakpoints alone do not guarantee Riemann integrability. A bounded function can be nonintegrable even if its formula does not change at any breakpoint.

Under the stated conditions, the function is continuous except possibly at the finitely many breakpoints. The earlier result on integrability with finitely many discontinuities therefore ensures that it is Riemann integrable.

The Breakpoint-Splitting Result

Theorem: Suppose \(f\) is bounded on \([a,b]\), and there are finitely many breakpoints \(a=c_0<c_1<\cdots<c_m=b\). Suppose that on each \((c_{i-1},c_i)\), \(f\) agrees with a function \(g_i\) that extends continuously to \([c_{i-1},c_i]\). Then \(f\) is Riemann integrable, and $$ \int_a^b f(x)\,dx = \sum_{i=1}^{m}\int_{c_{i-1}}^{c_i} g_i(x)\,dx. $$

The piece integrals in this formula use the continuous extensions at the endpoints. In particular, a value assigned to \(f\) at a breakpoint does not create an extra contribution to the sum.

Why the Contributions Add

Here is a direct justification using Riemann sums. It also explains why putting the breakpoints into the partition is the natural choice.

1
Choose partitions containing the breakpoints.
Refine the intervals \([c_{i-1},c_i]\) separately, so every subinterval lies in one piece and the overall mesh tends to zero.
2
Separate the Riemann sums by piece.
For each such partition, its tagged sum over \([a,b]\) is the sum of the tagged sums over the individual intervals \([c_{i-1},c_i]\).
3
Take the limits.
For each piece, the continuous extension \(g_i\) is Riemann integrable, so its tagged sums tend to \(\int_{c_{i-1}}^{c_i}g_i(x)\,dx\). Any discrepancy from using the actual value of \(f\) at a breakpoint can occur only in subintervals touching that breakpoint. There are finitely many such subintervals, their lengths tend to zero, and the function is bounded. Their total contribution to the discrepancy therefore tends to zero.

Thus the global tagged sums tend to the sum of the piece integrals. The limit of the global sums is the Riemann integral of \(f\), giving the stated formula.

A Practical Calculation Method

When evaluating a Riemann integral of a piecewise-defined function, use the following sequence.

  1. List the endpoints of the full interval and every point where the defining rule changes.
  2. Check boundedness and the regularity of each piece. Continuous pieces on their respective closed intervals, with only finitely many possible endpoint discontinuities, satisfy the conditions above.
  3. Write one integral for each interval between consecutive breakpoints, using the formula that applies there.
  4. Evaluate each integral on its own bounds, then add the results.
  5. Check that every subinterval has been included exactly once and that no piece has been used outside its interval.

For a linear function \(h(x)=mx+b\), the Riemann integral on \([u,v]\) is \((v-u)(h(u)+h(v))/2\), the interval length multiplied by the average of the endpoint values. For polynomial pieces, standard Riemann-integral formulas can be used on each piece's interval. In either case, the breakpoints determine the bounds of each calculation.

Worked Examples

Worked Example: Two Linear Pieces Meeting at a Breakpoint

Let \(f\) be defined on \([-1,3]\) by $$ f(x)= \begin{cases} x+1, & -1\le x<1,\\ 3-x, & 1\le x\le 3. \end{cases} $$ The formula changes at \(x=1\), so partition at \(-1,1,3\). Both pieces are linear, and the function is bounded, so it is Riemann integrable.

On the first interval, the continuous extension \(x+1\) has endpoint values \(f(-1)=0\) and \(1+1=2\). The interval length is \(1-(-1)=2\). Therefore, $$ \int_{-1}^{1}(x+1)\,dx =2\left(\frac{0+2}{2}\right)=2. $$ On the second interval, \(3-x\) has endpoint values \(3-1=2\) and \(3-3=0\), and the interval length is \(3-1=2\). Thus, $$ \int_{1}^{3}(3-x)\,dx =2\left(\frac{2+0}{2}\right)=2. $$ Adding the contributions gives $$ \int_{-1}^{3} f(x)\,dx=2+2=4. $$ As a check, the two linear pieces have the same endpoint values in reverse order, and each spans an interval of length \(2\); the average endpoint value on each is \(1\), giving \(2\) for each piece and \(4\) in total.

Worked Example: A Quadratic Piece Followed by a Linear Piece

Define $$ f(x)= \begin{cases} x^2, & 0\le x<1,\\ 2x-1, & 1\le x\le 2. \end{cases} $$ The breakpoint is \(x=1\). Both formulas extend continuously to their respective closed intervals, and \(f\) is bounded, so the splitting result applies.

For the first piece, use \(\int x^2\,dx=x^3/3\): $$ \int_0^1 x^2\,dx =\left[\frac{x^3}{3}\right]_0^1 =\frac{1^3}{3}-\frac{0^3}{3} =\frac13. $$ For the second piece, an antiderivative of \(2x-1\) is \(x^2-x\), since its derivative is \(2x-1\). Hence $$ \int_1^2(2x-1)\,dx =[x^2-x]_1^2 =(2^2-2)-(1^2-1) =(4-2)-(1-1)=2. $$ The total is $$ \int_0^2 f(x)\,dx=\frac13+2=\frac73. $$ Check the linear-piece contribution using endpoint values: \(2(1)-1=1\) at \(x=1\) and \(2(2)-1=3\) at \(x=2\). Its length is \(1\), so its integral is \(1(1+3)/2=2\), as computed. The first contribution is \(1/3\), and their sum is \(7/3\).

Worked Example: Several Pieces with Jumps

Consider the bounded function on \([-2,2]\) given by $$ f(x)= \begin{cases} 2, & -2\le x<-1,\\ x+2, & -1\le x<1,\\ 4, & 1\le x\le 2. \end{cases} $$ Its breakpoints are \(-1\) and \(1\). The middle piece approaches \(1\) at \(-1\) and \(3\) at \(1\), while the adjacent pieces have values \(2\) and \(4\). Jumps are allowed at these finitely many breakpoints, and each piece has a continuous extension, so the function is Riemann integrable.

The first contribution is $$ \int_{-2}^{-1}2\,dx=2\bigl((-1)-(-2)\bigr)=2(1)=2. $$ For the middle interval, an antiderivative of \(x+2\) is \(x^2/2+2x\), because its derivative is \(x+2\). Thus $$ \int_{-1}^{1}(x+2)\,dx =\left[\frac{x^2}{2}+2x\right]_{-1}^{1} =\left(\frac12+2\right)-\left(\frac12-2\right) =\frac52-\left(-\frac32\right)=4. $$ The last contribution is $$ \int_1^2 4\,dx=4(2-1)=4. $$ Therefore, $$ \int_{-2}^{2}f(x)\,dx=2+4+4=10. $$ As a check, the middle linear piece has endpoint values \(1\) and \(3\) across an interval of length \(2\), so its average endpoint value is \(2\) and its integral is \(2\cdot2=4\). The constant pieces contribute their heights times their lengths, \(2\cdot1=2\) and \(4\cdot1=4\), confirming the total \(10\).

A Common Mistake

A common error is to use one of the formulas across an interval that includes a breakpoint. In the first worked example, using \(x+1\) over the whole interval \([-1,3]\) gives $$ \int_{-1}^{3}(x+1)\,dx =\left[\frac{x^2}{2}+x\right]_{-1}^{3} =\left(\frac92+3\right)-\left(\frac12-1\right) =\frac{15}{2}-\left(-\frac12\right)=8. $$ This is not the integral of \(f\): for \(x\ge1\), the function is \(3-x\), not \(x+1\). The calculation has integrated the wrong function on \([1,3]\).

The correction is to include the breakpoint \(1\) and use each formula only on its own interval: $$ \int_{-1}^{3}f(x)\,dx =\int_{-1}^{1}(x+1)\,dx+\int_{1}^{3}(3-x)\,dx =2+2=4. $$ The partition is part of the reasoning: it ensures that every formula is applied only where it defines the function.

Why the Method Matters

Partitioning at breakpoints turns a piecewise calculation into a collection of calculations on intervals where the rule is consistent. It also makes the assumptions visible. A bounded piecewise-defined function with continuous extensions on finitely many pieces is integrable, but “finitely many breakpoints” by itself is not enough. Both the correct partition and the regularity of the pieces matter.

Before accepting a result, check three things: every breakpoint is included, each formula is paired with its own interval, and the contributions have been added without omission or duplication. Those checks prevent the most common errors in piecewise Riemann-integral calculations.

Check Your Understanding

Use the breakpoint-splitting method to answer these questions.

  1. For a piecewise function whose formula changes at \(x=2\) on \([0,5]\), which points must a partition include?
  2. Why does a bounded function with finitely many breakpoints not necessarily have a Riemann integral?
  3. Suppose a bounded function has two pieces, each extending continuously to its closed subinterval. What condition does this give for its Riemann integrability?
  4. For \(f(x)=x+1\) on \([0,1)\) and \(f(x)=3\) on \([1,2]\), write the two integrals whose sum gives \(\int_0^2 f(x)\,dx\). Do not evaluate them.
  5. In the preceding question, why would integrating \(x+1\) across all of \([0,2]\) be incorrect?

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