Areas Between Curves

Say we have a pair of curves:

𝒙𝒚

What's the area betwee a{a} and b{b}? Well, we can chop it up into Riemann sums:

𝒙𝒚

We'll denote the width of each rectangle as dx.{dx.} What's the height? It's the difference between the top point of the rectangle (where the rectangle touches f(x){f(x)}) and the bottom point of the rectangle (where it touches g(x){g(x)}). Thus, for a single rectangle we have the area:

Ai=(f(x)g(x))dx A_i = (f(x) - g(x)) \cdot dx

Making dx{dx} smaller:

𝒙𝒚

and smaller:

𝒙𝒚

and even smaller:

𝒙𝒚

we eventually fill in the area bounded to the left by a,{a,} to the right by b,{b,} above by f(x),{f(x),} and below by g(x).{g(x).} What's the value of this area? It's the sum of all the areas of the individual rectangles:

AT=A0+A1+A2++An A_T = A_0 + A_1 + A_2 + \ldots + A_n

Now that we've seen integrals, this is really:

AT=A0+A1+A2++An=ab(f(x)g(x))dx\begin{aligned} A_T &= A_0 + A_1 + A_2 + \ldots + A_n \\[1em] &= \int_{a}^{b} (f(x) - g(x)) dx \end{aligned}

This is how we find the area between two curves. Importantly, whenever we want to know such an area we want to first identify the integrand (our rectangle's height):

ab(f(x)g(x))dx \int_{a}^{b} {\color{blue}(f(x) - g(x))} dx

Once we have this information, we want to know the limits, or bounds:

ab(f(x)g(x))dx {\color{red}\int_{a}^{b}} (f(x) - g(x)) dx

These are the key pieces of information. We want to know the lower bound a,{a,} the upper bound b,{b,} and the integrand f(x)g(x).{f(x)-g(x).} While it may seem like a simple task, it turns out that for many areas, this can be difficult. For example, consider the following problem:

problem. What is the area between x=y2{x = y^2} and y=x2?{y=x-2?}

The first step is to always try and create a visualization of the curves.

𝒙𝒚

At this point, we see a problem. x=y2{x = y^2} is not a function. A function is a a relation from RR.{\reals \to \reals.} Thus, for x=y2,{x = y^2,} we've effectively specified the set of ordered pairs:

{(x,y)R2:x=y2} \{ (x,y) \in \reals^2 : x = y^2 \}

And in doing so, it's no longer clear whether x{x} is a function of y,{y,} or whether y{y} is a function of x.{x.} And because of that ambiguity, we have a situation where it's unclear where our rectangles' heights start and end. It could start at x=y2{x = y^2} and end at y=x2.{y = x-2.} It could start at x=y2{x = y^2} and end at x=y2:{x = y^2:}

𝒙𝒚

To solve this problem, we'll have to split the area into two halves and sum the two after. And to do that, we need the intersection points:

𝒙𝒚(0,0)(1,-1)(4,2)

Since x=y2{x = y^2} and y=x2,{y = x-2,} we have:

y=y22 y = y^2 - 2

This is a quadratic. Solve for y:{y:}

y2y2=0(y+2)(y2)=0\begin{aligned} y^2 - y - 2 &= 0 \\ (y+2)(y-2) &= 0 \end{aligned}

Thus, we have:

y{2,1} y \in \{ 2, -1 \}

Next, from the implicit function theorem, we know that the top curve can be rewritten as:

y=x y = \sqrt{x}

and the bottom curve is:

y=x y = - \sqrt{x}

Finally, the line between the (1,1){(1,-1)} and (4,2){(4,2)} is given by the equation:

y=x2 y = x - 2

At this point, we can find the area:

A=01x(x)dx+14x(x2)dx \text{A} = \int_{0}^{1} \sqrt{x} - (-\sqrt{x}) dx + \int_{1}^{4} \sqrt{x} - (x - 2) dx

Integrating for a Different Variable

The procedure above is meticulous. There's a much faster way: Integrating with respect to y.{y.} Visually, this means we compute the area by dividing the region into horizontal rectangles.

To do so, we rewrite all of the equations to render them as true functions. Thus:

x=y2x=y2y=x2x=y+2 \begin{aligned} x = y^2 \nc x &= y^2 \\ y = x - 2 \nc x &= y + 2 \end{aligned}

Now we integrate in the dy{dy} variable:

12(y+2y2)dy \int_{-1}^{2} (y+2 - y^2) dy

The y+2{y+2} gives us the left endpoint of the rectangle, and the y2{y^2} gives us the right endpoint of the rectangle.