I am having trouble understanding the following definite integral:

$\displaystyle \int_{-2}^{\frac{-1 + \sqrt{17}}{2}} 5 - x^2 - |x + 1|$

The way I did it is as follows:

$\displaystyle \int_{-2}^{0} 5 - x^2 + x + 1 + \int_{0}^{\frac{-1 + \sqrt{17}}{2}} 5 - x^2 - x - 1$

from which I got a similar answer to the correct one which looked as follows:

$\displaystyle \int_{-2}^{-1} 5 - x^2 + x + 1 + \int_{-1}^{\frac{-1 + \sqrt{17}}{2}} 5 - x^2 - x - 1$

My question is that due to it being an absolute value surely you have to break the integral up into $\displaystyle \int _{a}^{0} + \int _{0}^{b}$?