Tutorials › Calculus I › Partitioning at Boundary Switches

Area Between Curves · Tutorial 1203 of 1495

Partitioning at Boundary Switches

Partition an interval at every change in boundary order, then calculate each nonnegative area contribution and add the results.

Intermediate 10 min read

What You'll Learn

  • Identify boundary-switch points by comparing the two functions and solving where they are equal.
  • Use the sign of the difference between the functions to determine which curve is upper on each subinterval.
  • Write the area as a sum of integrals of upper-minus-lower gaps.
  • Explain why the integral must be split when the boundary order changes.
  • Check each area contribution and recognize cancellation in a single signed integral.

Why Boundary Switches Require a Partition

When two curves cross, the curve that is higher before the crossing may be lower afterward. A vertical slice through the region still has a nonnegative height, but the expression for that height changes at the crossing. The area calculation must change with it.

The practical method is to find each point where the boundary order switches, divide the interval at those points, and integrate upper minus lower on each resulting subinterval. Because each gap is nonnegative, every integral represents an area contribution, and the contributions can be added.

Switch Points and the Area Formula

Definition: Let \(f\) and \(g\) be continuous functions on \([a,b]\). An interior point \(c\) is a boundary-switch point if \(f(c)=g(c)\) and the ordering of \(f\) and \(g\) changes as \(x\) passes through \(c\). Thus, one curve is higher on one side of \(c\), and the other is higher on the other side.

To locate possible switches, solve \(f(x)=g(x)\), or equivalently \(f(x)-g(x)=0\), in the interval. Then determine the sign of \(f(x)-g(x)\) between consecutive solutions. A positive sign means \(f\) is higher; a negative sign means \(g\) is higher. Any intersection that is an endpoint is already a partition boundary. A point where the curves meet but do not change order does not require a switch in the height formula, although it may be used as an additional cut if convenient.

Suppose the interior switch points, in increasing order, are \(c_1,\ldots,c_n\). Set \(c_0=a\) and \(c_{n+1}=b\). On each interval \([c_i,c_{i+1}]\), identify the upper and lower curves. The area is the sum of the integrals of their nonnegative gaps.

$$ A=\sum_{i=0}^{n}\int_{c_i}^{c_{i+1}} \bigl(\text{upper curve}-\text{lower curve}\bigr)\,dx. $$

The boundaries of the subintervals can be shared, but those individual points have zero width and contribute no area. The key requirement is that the upper-minus-lower expression be chosen separately on each interval where the order is fixed.

Why Splitting Gives the Area

For continuous curves, the vertical-slice description of area says that the area over an interval is the integral of the slice height, provided that height is nonnegative. At a boundary switch, the height expression changes: on one side it is \(f-g\), and on the other side it is \(g-f\). Additivity of definite integrals lets us calculate the area on each piece and then add the pieces.

Theorem: Suppose \(f\) and \(g\) are continuous on \([a,b]\), and the interval is partitioned at every point where their upper-lower ordering changes. On each resulting subinterval, let \(U_i\) be the upper curve and \(L_i\) the lower curve. Then the area between the curves is \(\sum_i\int (U_i-L_i)\,dx\), with each integral taken over its corresponding subinterval.
1
Find possible switch points.
Solve \(f(x)=g(x)\) within the interval, and order the relevant solutions from left to right.
2
Determine the order on each piece.
Use a test point in each open subinterval to check the sign of \(f-g\). Continuity ensures that the sign cannot change within an interval without another point where \(f=g\).
3
Integrate each nonnegative gap.
Write upper minus lower on that subinterval, evaluate the definite integral, and add the results.

The sign claim in Step 2 follows from the Intermediate Value Theorem. If the continuous function \(f-g\) had opposite signs at two points in one subinterval, it would equal zero somewhere between them. Once all order-changing points have been included as partition boundaries, the order is therefore fixed on each open piece.

Worked Examples

Worked Example: One Interior Switch

Find the area between \(f(x)=x^2\) and \(g(x)=2x\) on \([0,3]\).

First find intersections:

$$ x^2=2x \quad\Longrightarrow\quad x(x-2)=0 \quad\Longrightarrow\quad x=0\text{ or }x=2. $$

The point \(x=0\) is an endpoint. The order changes at the interior point \(x=2\), so use the subintervals \([0,2]\) and \([2,3]\). On \((0,2)\), \(x^2-2x=x(x-2)<0\), so \(g\) is higher. On \((2,3)\), \(x(x-2)>0\), so \(f\) is higher.

The area on the first subinterval is:

$$ \int_0^2(2x-x^2)\,dx = \left[x^2-\frac{x^3}{3}\right]_0^2 = \left(4-\frac{8}{3}\right)-0 = \frac{4}{3}. $$

The area on the second subinterval is:

$$ \int_2^3(x^2-2x)\,dx = \left[\frac{x^3}{3}-x^2\right]_2^3 = (9-9)-\left(\frac{8}{3}-4\right) = \frac{4}{3}. $$

Adding the nonnegative pieces gives \(A=\frac{4}{3}+\frac{4}{3}=\frac{8}{3}\) square units. To check the antiderivatives, \(\frac{d}{dx}(x^2-\frac{x^3}{3})=2x-x^2\), and \(\frac{d}{dx}(\frac{x^3}{3}-x^2)=x^2-2x\). Both evaluated integrals are positive, as required for areas.

Worked Example: Two Interior Switches

Find the area between \(f(x)=x^2-2x+2\) and \(g(x)=x\) on \([0,3]\).

The difference factors as:

$$ f(x)-g(x)=x^2-3x+2=(x-1)(x-2). $$

The curves meet at \(x=1\) and \(x=2\). Test points \(x=\frac12,\frac32,\frac52\) lie in the three open subintervals. The corresponding differences are:

$$ \left(\frac12-1\right)\left(\frac12-2\right)=\frac34>0,\qquad \left(\frac32-1\right)\left(\frac32-2\right)=-\frac14<0,\qquad \left(\frac52-1\right)\left(\frac52-2\right)=\frac34>0. $$

Thus \(f\) is upper on \([0,1]\), \(g\) is upper on \([1,2]\), and \(f\) is upper on \([2,3]\). An antiderivative of the difference is \(F(x)=\frac{x^3}{3}-\frac{3x^2}{2}+2x\), since \(F'(x)=x^2-3x+2\). Its needed values are:

$$ F(0)=0,\qquad F(1)=\frac56,\qquad F(2)=\frac83-6+4=\frac23,\qquad F(3)=9-\frac{27}{2}+6=\frac32. $$

Now calculate each piece using the correct order:

$$ \begin{aligned} A &=\int_0^1(f-g)\,dx+\int_1^2(g-f)\,dx+\int_2^3(f-g)\,dx\\ &=\left(F(1)-F(0)\right) -\left(F(2)-F(1)\right) +\left(F(3)-F(2)\right)\\ &=\frac56+\frac16+\frac56 =\frac{11}{6}. \end{aligned} $$

Each contribution is positive: the middle one is \(-(\frac23-\frac56)=\frac16\). The derivative check \(F'(x)=x^2-3x+2\) confirms the antiderivative, and the sign tests confirm which gap to integrate on each piece. The total area is \(\frac{11}{6}\) square units.

Worked Example: Trigonometric Curves with a Switch

Find the area between \(f(x)=\sin x\) and \(g(x)=\cos x\) on \([0,\frac{\pi}{2}]\).

The curves are equal when \(\sin x=\cos x\), which in this interval gives \(x=\frac{\pi}{4}\). For \(0<x<\frac{\pi}{4}\), \(\sin x<\cos x\); for \(\frac{\pi}{4}<x<\frac{\pi}{2}\), \(\sin x>\cos x\). The area is therefore:

$$ \begin{aligned} A &=\int_0^{\pi/4}(\cos x-\sin x)\,dx +\int_{\pi/4}^{\pi/2}(\sin x-\cos x)\,dx\\ &=[\sin x+\cos x]_0^{\pi/4} +[-\cos x-\sin x]_{\pi/4}^{\pi/2}\\ &=(\sqrt{2}-1)+(\sqrt{2}-1) =2\sqrt{2}-2. \end{aligned} $$

The antiderivatives check directly: \(\frac{d}{dx}(\sin x+\cos x)=\cos x-\sin x\) and \(\frac{d}{dx}(-\cos x-\sin x)=\sin x-\cos x\). The two positive pieces add to \(2\sqrt{2}-2\) square units.

A Common Mistake: Using One Signed Integral

In the two-switch example, integrating \(f-g\) over the entire interval would give:

$$ \int_0^3(f-g)\,dx=F(3)-F(0)=\frac32. $$

This is not the geometric area, which is \(\frac{11}{6}\). On the middle interval, \(f-g<0\), so its signed integral subtracts that region instead of adding its positive area. The incorrect calculation has counted the first and third pieces positively but the middle piece negatively.

The correction is to reverse the gap on the middle interval: use \(g-f\) there, while using \(f-g\) on the other two intervals. This produces \(\frac56+\frac16+\frac56=\frac{11}{6}\). A useful check is that every integral in the area sum must be nonnegative; a negative contribution signals that the upper and lower curves have been reversed on that piece.

A Reliable Checklist

Before evaluating the integrals, write down the partition and the boundary order on each part. This makes it easier to catch a missed switch or a reversed gap before it affects the result.

  • Solve \(f(x)=g(x)\) and keep the relevant solutions in the interval.
  • Place the order-changing points in increasing order and use them to partition the interval.
  • Choose an interior test point on each subinterval and determine the sign of \(f-g\).
  • Write upper minus lower on every piece, so each integrand is nonnegative.
  • Evaluate each definite integral and add the resulting areas.
  • Check that the antiderivatives differentiate to the integrands and that no piece contributes a negative area.

Check Your Understanding

For each question, identify the boundary order before setting up any area integral.

  1. What equation locates possible points where two curves meet?
  2. If \(f(x)-g(x)<0\) on a subinterval, which curve is upper there, and what gap should be integrated?
  3. Why can integrating \(f-g\) across an entire interval fail to give geometric area when the curves switch order?
  4. For \(f(x)=x^2\) and \(g(x)=2x\) on \([0,3]\), what point divides the interval into pieces with fixed boundary order?
  5. What does a negative value for one proposed area contribution indicate about the setup?

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