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

Compute the area between the graphs of functions

Let

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

Find the area between the graphs of f and g on the interval \left[-1,\frac{1+\sqrt{5}}{2}\right].


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

Rendered by QuickLaTeX.com

For this exercise, since f and g cross in the interval we are interested in (and we are calculating the area between the graphs, so we’re really looking at the integral of |f(x) - g(x)|) we split the integral into two pieces (at the point the functions cross). We have f(x) \geq g(x) on \left[-1,\frac{1-\sqrt{5}}{2}\right] and g(x) \geq f(x) on \left[\frac{1-\sqrt{5}}{2},\frac{1+\sqrt{5}}{2}\right]; thus, we have

    \begin{align*}   a(S) = \int_{-1}^{\frac{1+\sqrt{5}}{2}} |f(x) - g(x)| \, dx &= \int_{-1}^{\frac{1-\sqrt{5}}{2}} (x^2 - x - 1) \, dx + \int_{\frac{1-\sqrt{5}}{2}}^{\frac{1+\sqrt{5}}{2}} (x+1 - x^2) \, dx \\   &\phantom{=} \\   &= \left. \left(\frac{x^3}{3} - \frac{x^2}{2} - x \right) \right|_{-1}^{\frac{1-\sqrt{5}}{2}} + \left. \left( -\frac{x^3}{3} + \frac{x^2}{2} + x \right) \right|_{\frac{1-\sqrt{5}}{2}}^{\frac{1+\sqrt{5}}{2}} \\   &\phantom{=} \\   &= -\frac{3}{4} + \frac{5 \sqrt{5}}{12} + \frac{5 \sqrt{5}}{6} \\   &= \frac{1}{4} (5 \sqrt{5} - 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):