Tutorials › AP Statistics › Piecewise Upper and Lower Boundaries

Area Between Curves · Tutorial 643 of 999

Piecewise Upper and Lower Boundaries

Represent changing boundaries with piecewise functions, find the correct switching points, and set up and evaluate the area one interval at a time.

Intermediate 10 min read

What You'll Learn

  • Identify which candidate curve forms the active upper or lower boundary on each interval.
  • Find and verify the x-values where the active boundary changes.
  • Write piecewise boundary functions with consistent top-to-bottom order.
  • Split an area integral at every relevant switching point.
  • Check a piecewise setup by testing interval points and confirming its area.

Why a Single Pair of Curves May Not Be Enough

An area between curves is often described with one upper function and one lower function over an entire interval. But a region can have a boundary made from different curve segments. As \(x\) changes, one curve may form the top edge on the left, while another forms it on the right. The same change can happen along the bottom edge.

The important task is to identify which curve is actually part of the region's boundary on each interval. Once the active upper and lower curves are known, calculate the area separately on those intervals and add the results.

Key idea: When the active upper or lower boundary changes, split the interval at the change. On each resulting interval, write the area integrand as the upper boundary minus the lower boundary.

Piecewise Boundaries and Switching Points

Suppose a region is described using vertical slices, with \(x\) running from \(a\) to \(b\). At each \(x\), the slice extends from a lower boundary to an upper boundary. Those boundaries may be different functions on different parts of the interval.

Definition: A piecewise upper boundary is a function whose formula depends on which subinterval contains \(x\), with each formula giving the top edge of the region there. A piecewise lower boundary is defined similarly for the bottom edge. A switching point is an \(x\)-value where the active boundary changes from one curve segment to another.

A switching point is often found by solving an equation between two candidate curves. However, solving an intersection equation only identifies a possible change. You must also check which curve bounds the region on either side of the point and whether the intersection belongs to the region being considered.

The area setup has the form

$$ A=\sum_{i=1}^{n}\int_{x_{i-1}}^{x_i} \bigl(U_i(x)-L_i(x)\bigr)\,dx, $$

where \(x_0<x_1<\cdots<x_n\) are the endpoints and switching points, \(U_i\) is the active upper boundary on the \(i\)th interval, and \(L_i\) is its active lower boundary. The same formula applies if a boundary does not switch on every interval; simply use the same function on either side of that point.

Why the Integral Must Be Split

The vertical-slice area formula works because a thin slice has height equal to its top \(y\)-value minus its bottom \(y\)-value. If those values are \(U(x)\) and \(L(x)\), its height is \(U(x)-L(x)\). Adding the slice areas across the interval gives the integral of that height.

When the active curves change, the slice-height formula changes too. The following argument explains why splitting at each change gives the correct total.

1
Mark the changes.
List the interval endpoints and every point where the active upper or lower curve changes. Order these values as \(x_0<x_1<\cdots<x_n\).
2
Choose the boundaries on each piece.
Within each interval \([x_{i-1},x_i]\), identify its upper function \(U_i\) and lower function \(L_i\).
3
Compute and add the areas.
The area on that interval is \(\int_{x_{i-1}}^{x_i}(U_i(x)-L_i(x))\,dx\). Adjacent pieces share only a vertical edge or a single switching point, which contributes no area. Therefore, adding the piece areas counts the entire region once.

This also explains why using one pair of formulas across a switching point can fail: it assigns the wrong height to slices on at least one side of the change.

Worked Example: The Upper Boundary Switches

Worked Example: The Upper Boundary Switches

A region lies above \(y=0\), below both \(y=x\) and \(y=4-x\), and between \(x=0\) and \(x=3\). Set up and evaluate its area.

The top edge is the lower of the two proposed upper curves. Find where they meet:

$$ x=4-x \quad\Longrightarrow\quad 2x=4 \quad\Longrightarrow\quad x=2. $$

Test a point to the left, such as \(x=1\). The curves have values \(1\) and \(3\), so \(y=x\) is lower and forms the top edge. Test a point to the right, such as \(x=3\). Their values are \(3\) and \(1\), so \(y=4-x\) forms the top edge. The bottom edge is \(y=0\) throughout. Thus

$$ U(x)= \begin{cases} x, & 0\le x\le 2,\\ 4-x, & 2\le x\le 3, \end{cases} \qquad L(x)=0. $$

Integrate on the two intervals:

$$ \begin{aligned} A &=\int_0^2 (x-0)\,dx+\int_2^3 ((4-x)-0)\,dx\\ &=\left[\frac{x^2}{2}\right]_0^2 +\left[4x-\frac{x^2}{2}\right]_2^3\\ &=(2-0)+\left(\frac{15}{2}-6\right)\\ &=2+\frac{3}{2} =\frac{7}{2}. \end{aligned} $$

The antiderivatives check: the derivative of \(x^2/2\) is \(x\), and the derivative of \(4x-x^2/2\) is \(4-x\). At the switch, both proposed top curves give \(2\), so the boundary joins. Both integrands are nonnegative on their intervals, and the resulting area, \(7/2\) square units, is positive.

Worked Example: The Lower Boundary Switches

Worked Example: The Lower Boundary Switches

A region lies below \(y=4\), above both \(y=x\) and \(y=3-x\), and between \(x=0\) and \(x=3\). Find its area.

The bottom edge is the higher of the two proposed lower curves. They meet when

$$ x=3-x \quad\Longrightarrow\quad 2x=3 \quad\Longrightarrow\quad x=\frac{3}{2}. $$

For \(x=1\), the candidate lower values are \(1\) and \(2\), so \(y=3-x\) forms the bottom edge to the left of the switch. For \(x=2\), their values are \(2\) and \(1\), so \(y=x\) forms the bottom edge to the right. The upper edge is \(y=4\) on the whole interval:

$$ L(x)= \begin{cases} 3-x, & 0\le x\le \frac{3}{2},\\ x, & \frac{3}{2}\le x\le 3, \end{cases} \qquad U(x)=4. $$

The two piece areas are

$$ \begin{aligned} A &=\int_0^{3/2} \bigl(4-(3-x)\bigr)\,dx +\int_{3/2}^3 (4-x)\,dx\\ &=\int_0^{3/2}(1+x)\,dx+\int_{3/2}^3(4-x)\,dx\\ &=\left[x+\frac{x^2}{2}\right]_0^{3/2} +\left[4x-\frac{x^2}{2}\right]_{3/2}^3\\ &=\left(\frac{3}{2}+\frac{9}{8}\right) +\left(\frac{15}{2}-\frac{39}{8}\right)\\ &=\frac{21}{8}+\frac{21}{8} =\frac{21}{4}. \end{aligned} $$

The antiderivatives differentiate to \(1+x\) and \(4-x\), as required. At \(x=3/2\), both lower curves equal \(3/2\); at the tested points the stated lower curve is indeed the higher one. Each top-minus-bottom expression is positive on its interval, and the area is \(21/4\) square units.

When Both Boundaries Change

If both the upper and lower edges change, include all relevant switching points in the partition. The upper and lower boundaries do not have to switch at the same \(x\)-value.

Worked Example: Both Boundaries Switch

Consider the region whose top edge is the lower of \(y=2x\) and \(y=6-x\), and whose bottom edge is the higher of \(y=0\) and \(y=x-3\). Find the enclosed area.

The possible top-boundary switch occurs at

$$ 2x=6-x \quad\Longrightarrow\quad 3x=6 \quad\Longrightarrow\quad x=2. $$

For \(x=1\), the top candidates are \(2\) and \(5\), so \(y=2x\) is active. For \(x=3\), they are \(6\) and \(3\), so \(y=6-x\) is active. The bottom candidates meet when

$$ 0=x-3 \quad\Longrightarrow\quad x=3. $$

For \(x=2\), \(y=0\) is higher than \(y=x-3=-1\), so it is the lower edge there. For \(x=4\), \(y=x-3=1\) is higher than \(y=0\), so it is the lower edge after the switch. Finally, the region ends where its top and bottom meet: \(6-x=x-3\) gives \(x=9/2\). The resulting pieces are

$$ \begin{array}{c|c|c} \text{Interval} & \text{Upper boundary} & \text{Lower boundary}\\ [0,2] & 2x & 0\\ [2,3] & 6-x & 0\\ [3,\frac{9}{2}] & 6-x & x-3 \end{array} $$

Now integrate each top-minus-bottom expression:

$$ \begin{aligned} A &=\int_0^2 2x\,dx +\int_2^3 (6-x)\,dx +\int_3^{9/2}\bigl((6-x)-(x-3)\bigr)\,dx\\ &=\left[x^2\right]_0^2 +\left[6x-\frac{x^2}{2}\right]_2^3 +\left[9x-x^2\right]_3^{9/2}\\ &=4+\frac{7}{2}+\frac{9}{4}\\ &=\frac{39}{4}. \end{aligned} $$

The antiderivatives differentiate to \(2x\), \(6-x\), and \(9-2x\), respectively. At \(x=2\), the top candidates both equal \(4\); at \(x=3\), the bottom candidates both equal \(0\). At \(x=9/2\), the top and bottom both equal \(3/2\), confirming the final endpoint. The top-minus-bottom expressions are nonnegative on their listed intervals, and the total area is \(39/4\) square units.

A Common Mistake: Keeping the First Boundary Everywhere

In the first example, a tempting but incorrect setup is to use \(y=x\) as the top boundary across all of \([0,3]\), because it is the active top curve on the left. That gives

$$ \int_0^3 x\,dx =\left[\frac{x^2}{2}\right]_0^3 =\frac{9}{2}. $$

This counts too much area on \(2<x\le 3\): there, \(x\) lies above \(4-x\), outside the specified region. The correction is to split at \(x=2\) and use \(4-x\) for the top edge on the right, giving the correct area \(7/2\).

Check before integrating: On each interval, test a point between switching points. Verify that the chosen upper curve is above the chosen lower curve and that each one actually forms the boundary of the stated region.

Check Your Understanding

For each question, identify the active boundaries before evaluating or writing the integral.

  1. On \(0\le x\le 4\), a region lies above \(y=0\) and below both \(y=x\) and \(y=4-x\). Where does the upper boundary switch?
  2. A region lies below \(y=5\) and above both \(y=x\) and \(y=4-x\) on \(0\le x\le 4\). Which curve forms the lower boundary on each side of their intersection?
  3. Why is an intersection of two candidate curves only a possible switching point, rather than automatically a confirmed switch?
  4. Write an area integral for a region with upper boundary \(3x\) on \([0,1]\) and \(6-x\) on \([1,3]\), and lower boundary \(y=0\) throughout.
  5. In a piecewise area setup, why does a single switching point not need a separate area term?

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: 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