# Area Between Two Functions

If two functions $f(x)$ and $g(x)$ intersect at $x=1$ and $x=3$, and $f(x) \ge g(x)$ for all $1 \le x \le 3$, then the area of the shaded region between their points of intersection is given by:
\begin{align} \displaystyle A &= \int_{1}^{3}{f(x)}dx-\int_{1}^{3}{g(x)}dx \\ &= \int_{1}^{3}{\Big[f(x)-g(x)\Big]}dx \end{align}

### Example 1

Find the area bounded by the $x$-axis and $y=x^2-4x+3$.

\begin{align} \displaystyle x\text{-intercepts:} \\ x^2-4x+3 &= 0 \\ (x-1)(x-3) &=0 \\ x &=1 \text{ and } x=3 \\ \end{align}

\begin{align} \displaystyle A &= \int_{1}^{3}{\Big[0-(x^2-4x+3)\Big]}dx \\ &= \int_{1}^{3}{(-x^2+4x-3)}dx \\ &= \Big[\dfrac{-x^3}{3} + 2x^2- 3x\Big]_{1}^{3} \\ &= \Big(\dfrac{-3^3}{3} + 2 \times 3^2-3 \times 3 \Big)-\Big(\dfrac{-1^3}{3} + 2 \times 1^2- 3 \times 1\Big) \\ &= \dfrac{4}{3} \text{ units}^2 \end{align}

### Example 2

Find the area bounded by the $y=x+2$ and $y=x^2+x-2$.

\begin{align} \displaystyle \text{intersections:} \\ x^2+x-2 &= x+2 \\ x^2-4 &= 0 \\ (x+2)(x-2) &= 0 \\ x &=-2 \text{ and } x=2 \\ \end{align}

\begin{align} \displaystyle A &= \int_{-2}^{2}{\Big[(x+2)-(x^2+x-2)\Big]}dx \\ &= \int_{-2}^{2}{(x+2-x^2-x+2)}dx \\ &= \int_{-2}^{2}{(4-x^2)}dx \\ &= \Big[4x-\dfrac{x^3}{3}\Big]_{-2}^{2} \\ &= \Big(4 \times 2-\dfrac{2^3}{3}\Big)-\Big(4 \times (-2)-\dfrac{(-2)^3}{3}\Big) \\ &= \dfrac{32}{3} \text{ units}^2 \end{align}

### Example 3

Find the area bounded by the $x$-axis and $y=x^3-x^2-2x$.

\begin{align} \displaystyle x\text{-intercepts:} \\ x^3-x^2-2x &= 0 \\ x(x^2-x-2) &= 0 \\ x(x+1)(x-2) &= 0 \\ x &=-1, x=0 \text{ and } x=2 \\ \end{align}

\begin{align} \displaystyle A &= A_1 + A_2 \\ &= \int_{-1}^{0}{\big[(x^3-x^2-2x)-0\big]}dx + \int_{0}^{2}{\big[0-(x^3-x^2-2x)\big]}dx\\ &= \int_{-1}^{0}{(x^3-x^2-2x)}dx-\int_{0}^{2}{(x^3-x^2-2x)}dx\\ &= \Big[\dfrac{x^4}{4}-\dfrac{x^3}{3}-x^2\Big]_{-1}^{0}-\Big[\dfrac{x^4}{4}-\dfrac{x^3}{3}-x^2\Big]_{0}^{2} \\ &= 0-\Big[\dfrac{(-1)^4}{4}-\dfrac{(-1)^3}{3}-(-1)^2\Big]-\Big[\dfrac{2^4}{4}-\dfrac{2^3}{3}-2^2\Big]+0 \\ &= \dfrac{37}{12} \text{ units}^2 \\ \end{align}