Let $f(x) \colon = x^2$, $g(x) \colon= x+1$. Then what is the area bounded by the graphs of $f$ and $g$ between the vertical lines $x= -1$ and $x= (1+\sqrt{5})/2$?
My effort:
Since $$ f(x) - g(x) = x^2-x-1 = (x - \frac{1-\sqrt{5}}{2} ) (x - \frac{1 + \sqrt{5}}{2} ), $$ and since $$ -1 < \frac{1-\sqrt{5}}{2},$$ we can conclude that $g(x) \leq f(x) $ whenever $-1 \leq x \leq \frac{1-\sqrt{5}}{2}$, and $f(x) \leq g(x) $ whenever $\frac{1-\sqrt{5}}{2} \leq x \leq \frac{1+\sqrt{5}}{2}$.
So the required area is $$ \int_{-1}^{\frac{1-\sqrt{5}}{2}} (1+x -x^2) \ dx + \int_{\frac{1-\sqrt{5}}{2}}^{\frac{1+\sqrt{5}}{2}} (x^2-x-1) \ dx = ....$$
Am I along the right lines?
$$
A = \int_{-1}^{x_1}[f(x) - g(x)]dx + \int_{x_1}^{(1 + \sqrt{5})/2}[g(x) - f(x)]dx
$$
where $x_1$ is a root of equation $f(x) = g(x)$.
Almost right, you have made sign errors:
To the right of $\frac{1-\sqrt{5}}{2}$ $x^2 < x+1$ so you should be integrating $x+1-x^2$. Similarly your integrand for the first term is the negative of what it should be.
That is the reason you may be getting a peculiar negative answer...