Page 360 Problem 13

Task:

Find the total area enclosed by the functions \(f\) and \(g\).

\(f(x)=2x^2+5x-3\), \(g(x)=x^2+4x-1\)

Solution:

First we need to know where the functions intersect:

\(2x^2+5x-3=x^2+4x-1\\x^2+x-2=0\\(x+2)(x-1)=0\\x+2=0\text{ OR } x-1=0\\x=-2\text{ OR } x=1\)

So the area enclosed by the functions covers the range of \(x\) values from -2 to 1. We can tell from the \(y\)-intercepts that \(g(x)\) will have a greater value on this interval. Therefore…

\(A=\int_{-2}^1g(x)\,dx-\int_{-2}^1f(x)\,dx\\A=\int_{-2}^1x^2+4x-1\,dx-\int_{-2}^12x^2+5x-3\,dx\\A=_{-2}^1[\frac{x^3}{3}+2x^2-x]-_{-2}^1[\frac{2x^3}{3}+\frac{5x^2}{2}-3x]\\A=[(\frac{(1)^3}{3}+2(1)^2-1)-(\frac{(-2)^3}{3}+2(-2)^2-(-2))]-[(\frac{2(1)^3}{3}+\frac{5(1)^2}{2}-3(1))-(\frac{2(-2)^3}{3}+\frac{5(-2)^2}{2}-3(-2))]\\A=[(\frac{1}{3}+2-1)-(\frac{-8}{3}+8+2)]-[(\frac{2}{3}+\frac{5}{2}-3)-(\frac{-16}{3}+10+6)]\\A=[(\frac{4}{3})-(\frac{22}{3})]-[(\frac{1}{6})-(\frac{32}{3})]\\A=\frac{-18}{3}-\frac{-63}{6}\\A=\frac{27}{6}\\A=4.5\)

The area enclosed by the functions is 4.5 square units.

Checking the solution with R:

f_x <- function(x) {2*x^2 + 5*x -3}
g_x <- function(x) {x^2 + 4*x - 1}

as.numeric(integrate(g_x, lower = -2, upper = 1)[1]) - as.numeric(integrate(f_x, lower = -2, upper = 1)[1])
## [1] 4.5