Home » Blog » Compute the area between the graphs of functions

Compute the area between the graphs of functions

Let

    \[ f(x) = |x|, \qquad g(x) = x^2-1. \]

Find the area between the graphs of f and g on the interval [-1,1].


First, we draw the graph, shading the region S between the two graphs in blue.

Rendered by QuickLaTeX.com

In this problem f(x) \geq g(x) on the entire interval [-1,1]; however, the function f(x) = |x| is defined piecewise on this interval as

    \[ f(x) = |x| = \begin{cases} -x & \text{if } x \in [-1,0) \\ x & \text{if } x \in [0,1] \end{cases}. \]

Thus, we break the integral into intervals [-1,0] and [0,1], and in both cases we are taking the integral of f(x) - g(x), but the definition of f will depend on which interval we are in. The computation is as follows:

    \begin{align*}   a(S) = \int_{-1}^{1} (f(x) - g(x)) \, dx &= \int_{-1}^0 (-x - x^2 + 1) \, dx + \int_0^1 (x - x^2 + 1) \, dx \\  &= \left. \left(-\frac{x^2}{2} - \frac{x^3}{3} + x \right) \right|_{-1}^0 + \left. \left( \frac{x^2}{2} - \frac{x^3}{3} + x \right) \right|_0^1 \\  &= \left( \frac{1}{2} - \frac{1}{3} + 1 \right) + \left( \frac{1}{2} - \frac{1}{3} + 1 \right) \\  &= \frac{7}{3}. \end{align*}

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):