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

Compute the area between the graphs of functions

Let

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

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


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

Rendered by QuickLaTeX.com

In this problem g(x) \geq f(x) on the entire interval \left[-\frac{\sqrt{3}}{3},\frac{1}{3}\right]; however, the function f(x) = 2|x| is defined piecewise on this interval as

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

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

    \begin{align*}   a(S) = \int_{-\frac{\sqrt{3}}{3}}^{\frac{1}{3}} (g(x) - f(x)) \, dx &= \int_{-\frac{\sqrt{3}}{3}}^{\frac{1}{3}} g(x) \, dx - \int_{-\frac{\sqrt{3}}{3}}^{\frac{1}{3}} f(x) \, dx \\  &\phantom{=} \\  &= \int_{-\frac{\sqrt{3}}{3}}^{\frac{1}{3}} (1 - 3x^3) \, dx - \int_{-\frac{\sqrt{3}}{3}}^0 (-2x) \, dx - \int_0^{\frac{1}{3}} 2x \, dx \\  & \phantom{=} \\  &= \left. \left( x - \frac{3}{4}x^4 \right) \right|_{-\frac{\sqrt{3}}{3}}^{\frac{1}{3}} + (x^2) \biggr \rvert_{-\frac{\sqrt{3}}{3}}^0 - (x^2) \biggr \rvert_0^{\frac{1}{3}} \\  & \phantom{=} \\  &= \left( \frac{1}{3} - \frac{1}{108} + \frac{\sqrt{3}}{3} + \frac{1}{12}\right) + \left(-\frac{1}{3}\right) - \left( \frac{1}{9} \right) \\  &= \frac{9\sqrt{3} - 1}{27}. \end{align*}

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