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

Compute the area between the graphs of functions

Let

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

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


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 [-1,0] and g(x) \geq f(x) on [0,\sqrt{2}]; thus, we have

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

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