Unit 8 · Topic 8.6

Area with repeated crossings

Builds on area between two curves and the Intermediate Value Theorem. 12 minutes.

  1. Example 1Find every relevant crossing
  2. Example 2Determine which curve is on top in each interval
  3. Example 3Split the area calculation correctly
  4. Example 4Combine the region areas

Topic 8.4 found the area between the graphs of two continuous functions \(f\) and \(g\) on \([a,b]\) when \(f(x)\ge g(x)\) for every \(x\) there. The area is then the integral of \(f(x)-g(x)\) from \(a\) to \(b\). Two curves can also cross, so that \(f\) is above \(g\) on part of \([a,b]\) and below it on another part. This topic finds the area of such a region, and it shows why one integral of \(f(x)-g(x)\) no longer gives it.

The length of a slice

A wavy curve f and a nearly flat curve g that meet four times. The region between them from a to b, marked by faint dashed lines, is shaded teal where f is above g and red where g is above f. Chalk dots mark the three meeting points between a and b, and a faint dot marks a fourth one left of a. A thin vertical slice joins the two curves and moves with an orange handle on the axis. It is orange where f is above and red where g is above. A slider moves g up and down, and a button turns the red pieces teal. Below the figure, two numbers give the area of the region and the integral of f minus g.

Figure 1The region between the faint dashed lines at \(a\) and \(b\) is teal where \(f\) is above \(g\). It is red where \(g\) is above \(f\), because there \(f(x)-g(x)\) is negative. The slice at \(x\) is orange where \(f\) is above and red where \(g\) is above. The dots on the curves mark where they meet, and the faint one lies outside \([a,b]\).

In Figure 1, the shaded region lies between the curves \(y=f(x)\) and \(y=g(x)\) from \(x=a\) to \(x=b\). The dots on the curves mark the points where they meet. The orange slice at \(x\) runs from the lower curve to the upper curve, as in topic 8.4. Its length is the larger of \(f(x)\) and \(g(x)\) minus the smaller, which is \(|f(x)-g(x)|\).

Topic 8.4 filled a region with thin rectangles, each as tall as the slice length at a sample point. Here their total area is a Riemann sum for the slice length \(|f(x)-g(x)|\), which is continuous because \(f\) and \(g\) are. As the rectangles narrow, they fit the region more closely, and their total area approaches the integral of the slice length (topic 6.3). The area of the region is therefore the integral of \(|f(x)-g(x)|\) from \(a\) to \(b\).

To evaluate this integral with an antiderivative (topic 6.7), you remove the absolute value. Where \(f(x)\ge g(x)\), the slice length is \(f(x)-g(x)\), and where \(g(x)>f(x)\), it is \(g(x)-f(x)\). The formula changes where the upper curve changes, so the integral is split there, as topic 6.7 split \(|f|\) at the zeros of \(f\).

Where the upper curve changes

Drag the orange handle on the axis to move the slice across the region. The slice is orange where \(f\) is above \(g\), and red where \(g\) is above \(f\), which makes \(f(x)-g(x)\) negative. The region is red there too, and the slice changes color only at a dot.

The reason is the Intermediate Value Theorem (topic 1.16). The difference \(f-g\) is continuous on \([a,b]\). Suppose that it is positive at an input \(p\) and negative at an input \(q\). The theorem then gives an input between \(p\) and \(q\) where \(f-g\) is 0, so the curves meet there. If there are finitely many meeting points between \(a\) and \(b\), they cut \([a,b]\) into subintervals, and the region into pieces. No meeting point lies inside a subinterval, so \(f-g\) cannot take both signs there. One curve is therefore above on all of it, and the heights at one input inside it, called a test point, show which. The argument needs continuity, because the graph of a function with a jump can pass from above \(g\) to below \(g\) without meeting it.

The curves meet where \(f(x)=g(x)\). Solve this equation with every term on one side, because dividing by a factor loses its zeros. If algebra cannot solve it, use a graphing calculator. Keep only the solutions strictly between \(a\) and \(b\). If a step squares both sides, check each solution in the original equation, because squaring can add solutions. A solution outside \([a,b]\), like the one at the faint dot in Figure 1, does not cut the region. A solution at \(a\) or \(b\) is an end of the region, not a cut. At a meeting point, the curves can cross or only touch. Where they touch, the same curve stays above on both sides. Test every subinterval, rather than assume that the upper curve changes at each meeting point.

Area and the signed integral

Integrals over adjoining intervals add (topic 6.6), so the integral of \(|f(x)-g(x)|\) is the sum of its integrals over the subintervals. On each one, the integrand is the upper function minus the lower one, so its integral is the area of a piece (topic 8.4). Call \(A_f\) the total area of the pieces where \(f\) is above, and \(A_g\) that of the pieces where \(g\) is above. The area of the region is \(A_f+A_g\), and neither term is negative.

The integral of \(f(x)-g(x)\) over \([a,b]\) splits at the same points. On a piece where \(f\) is above, it gives the area of the piece. On a piece from \(c\) to \(d\) where \(g\) is above,

\[\begin{aligned}&\int_c^d\big(f(x)-g(x)\big)\,dx\\&=-\int_c^d\big(g(x)-f(x)\big)\,dx\end{aligned}\]

which is the negative of the area of the piece. The integral of \(f(x)-g(x)\) over \([a,b]\) is therefore \(A_f-A_g\). It is less than the area whenever \(A_g>0\), and it can be 0 or negative while the area is positive.

The numbers under Figure 1 give the area and the integral of \(f-g\). Lower \(g\) with its slider until no dot lies between \(a\) and \(b\). Then \(f\) is above \(g\) on all of \([a,b]\), and the two numbers agree, as in topic 8.4. Raise \(g\) again. The dots that appear between \(a\) and \(b\) cut the region, and the integral falls below the area by \(2A_g\), twice the red area.

Press Count every piece as positive. The red pieces turn teal and the slice is orange at every \(x\), because the integral of \(|f(x)-g(x)|\) counts every slice length as positive.

Example 1

Find every relevant crossing

Let \(R\) be the region between the graphs of \(y=x^3\) and \(y=4x\) from \(x=-1\) to \(x=3\). Find the \(x\)-coordinates of all points between \(x=-1\) and \(x=3\) where the two graphs intersect.

Solution

Both functions are polynomials, so they are continuous. The graphs intersect where \(x^3=4x\). With every term on one side, the equation factors:

\[\begin{aligned}x^3-4x&=x\left(x^2-4\right)\\&=x(x+2)(x-2)=0\end{aligned}\]

The solutions are \(-2\), 0 and 2. The solution \(-2\) lies left of the bound \(-1\), outside the interval. The other two lie strictly between \(-1\) and 3, so the graphs intersect at \(x=0\) and \(x=2\), at the points \((0,0)\) and \((2,8)\). These two inputs cut \(R\) into three pieces.

Example 2

Determine which curve is on top in each interval

Let \(f(x)=\sin x\) and \(g(x)=\cos x\). On which intervals in \([0,2\pi]\) is the graph of \(f\) above the graph of \(g\), and on which is it below?

Solution

Both functions are continuous. The graphs meet where \(\sin x=\cos x\). Where \(\cos x=0\), \(\sin x\) is 1 or \(-1\), so no solution has \(\cos x=0\), and dividing by \(\cos x\) loses none:

\[\tan x=1,\qquad x=\frac{\pi}{4}\ \text{or}\ x=\frac{5\pi}{4}\]

These two inputs cut \([0,2\pi]\) into three subintervals, and on each one a single curve is above. One test point inside each subinterval shows which:

\[\begin{array}{c|c|c|c}x&\frac{\pi}{6}&\frac{\pi}{2}&\frac{3\pi}{2}\\\hline\sin x&\frac12&1&-1\\\cos x&\frac{\sqrt3}{2}&0&0\end{array}\]

The graph of \(f\) is below the graph of \(g\) on \(\left[0,\frac{\pi}{4}\right)\) and on \(\left(\frac{5\pi}{4},2\pi\right]\), and above it on \(\left(\frac{\pi}{4},\frac{5\pi}{4}\right)\).

Example 3

Split the area calculation correctly

Let \(R\) be the region between the graphs of \(y=\dfrac{8}{x}\) and \(y=6-x\) from \(x=1\) to \(x=5\). Write, but do not evaluate, an expression involving one or more integrals that gives the area of \(R\).

Solution

The function \(\frac8x\) is continuous for \(x>0\), and \(6-x\) for every \(x\), so both are continuous on \([1,5]\). The graphs meet where \(\frac8x=6-x\). Multiply both sides by \(x\), which is not 0 there, so the solutions stay the same:

\[\begin{aligned}8&=6x-x^2\\x^2-6x+8&=0\\ (x-2)(x-4)&=0\end{aligned}\]

Both solutions lie between 1 and 5, so they cut \(R\) into three pieces. The difference \(\frac8x-(6-x)\) equals \(\frac{(x-2)(x-4)}{x}\), and its denominator is positive. It is positive for \(1\le x<2\) and for \(4<x\le 5\), where \(x-2\) and \(x-4\) have the same sign, and negative for \(2<x<4\). The curve \(y=\frac8x\) is therefore above on the outer pieces, and the line is above on the middle one:

\[\begin{aligned}A&=\int_1^2\Big(\frac8x-(6-x)\Big)\,dx\\&\quad+\int_2^4\Big((6-x)-\frac8x\Big)\,dx\\&\quad+\int_4^5\Big(\frac8x-(6-x)\Big)\,dx\end{aligned}\]

The single integral \(\int_1^5\left|\frac8x-(6-x)\right|dx\) is an equivalent answer.

Example 4

Combine the region areas

Find the area of the region between the graphs of \(y=x^2\) and \(y=x+6\) from \(x=1\) to \(x=4\).

Solution

Both functions are continuous. The graphs meet where \(x^2=x+6\), that is, where \((x-3)(x+2)=0\). The solution \(-2\) lies outside \([1,4]\), and \(x=3\) cuts the region into two pieces. For \(1\le x<3\), the factor \(x-3\) is negative and \(x+2\) is positive, so \(x^2<x+6\) and the line is above. For \(3<x\le 4\), both factors are positive, so the parabola is above. The area of each piece is the integral of the upper function minus the lower one:

\[\begin{aligned}\cb{A_1}&=\int_1^3\left(x+6-x^2\right)dx\\&=\Big[\tfrac12x^2+6x-\tfrac13x^3\Big]_1^3\\&=\tfrac{27}{2}-\tfrac{37}{6}=\tfrac{22}{3}\end{aligned}\]
\[\begin{aligned}\cb{A_2}&=\int_3^4\left(x^2-x-6\right)dx\\&=\Big[\tfrac13x^3-\tfrac12x^2-6x\Big]_3^4\\&=-\tfrac{32}{3}-\left(-\tfrac{27}{2}\right)=\tfrac{17}{6}\end{aligned}\]

The area of the region is the sum of the two areas, both positive:

\[\cb{A}=\frac{22}{3}+\frac{17}{6}=\frac{61}{6}\]

Each example is one of the four skills of topic 8.6 in Which & Why: AP Calculus.