Find the interval $[a, b]$ for which the value of the integral $$\int_a^b (2 + x − x^2) dx$$ is a maximum.
I've considered to let $f(x) = 2 + x - x^2 \implies f(x) = (2-x)(1+x)$. I've also considered that this is a negative quadratic graph, which shows that the positive area under the curve is bounded by the interval $-1$ to $2$. How do i then continue to maximise the value of the integral from the given interval $[a,b]$?
Please explain as well, thanks.