library(rootSolve)
In Exercises 13 – 20, find the total area enclosed by the functions f and g.
Given functions: \[ f(x) = 2x^2 + 5x - 3 \] \[ g(x) = x^2 + 4x - 1 \]
To find the intersection points, we set \(f(x) = g(x)\): \[ 2x^2 + 5x - 3 = x^2 + 4x - 1 \]
Solving this equation, we get: \[ x^2 + x - 2 = 0 \]
This quadratic equation can be factored as: \[ (x + 2)(x - 1) = 0 \]
So, the intersection points are \(x = -2\) and \(x = 1\).
Now, we integrate the absolute difference between the functions over the interval between these intersection points to find the total area enclosed: \[ \text{Total Area} = \int_{-2}^{1} |f(x) - g(x)| \, dx \]
\[ \text{Total Area} = \int_{-2}^{1} |(2x^2 + 5x - 3) - (x^2 + 4x - 1)| \, dx \]
\[ \text{Total Area} = \int_{-2}^{1} |x^2 + x - 2| \, dx \]
\[ \text{Total Area} = \int_{-2}^{1} (x^2 + x - 2) \, dx \]
\[ \text{Total Area} = \left[ \frac{x^3}{3} + \frac{x^2}{2} - 2x \right]_{-2}^{1} \]
Now, substitute the upper and lower limits:
\[ \text{Total Area} = \left( \frac{1^3}{3} + \frac{1^2}{2} - 2(1) \right) - \left( \frac{(-2)^3}{3} + \frac{(-2)^2}{2} - 2(-2) \right) \]
\[ \text{Total Area} = \left( \frac{1}{3} + \frac{1}{2} - 2 \right) - \left( -\frac{8}{3} + 2 + 4 \right) \]
\[ \text{Total Area} = \left( \frac{1}{3} + \frac{1}{2} - 2 \right) + \left( \frac{8}{3} - 6 \right) \]
\[ \text{Total Area} = \left( -\frac{5}{6} \right) + \left( -\frac{10}{3} \right) \]
\[ \text{Total Area} = -\frac{5}{6} - \frac{10}{3} \]
\[ \text{Total Area} = -\frac{5}{6} - \frac{20}{6} \]
\[ \text{Total Area} = -\frac{25}{6} \]
Total area for \(f\) and \(g\) is \(-\frac{25}{6}\).