Find the interval of $[a, b]$ to obtain a maximum integral. Find the interval $[a, b]$ for which the value of the integral 
$$\int_a^b (2 + x − x^2) dx$$
is a maximum. 
My Approach:
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. 

Define $F(a,b)=\int_a^b f(x)~dx$ and you are looking for the global maximum of $F$ with the restriction $a\leq b$. You can do it by computing 
$$
\nabla F(a,b)=\begin{pmatrix}f(b)\\-f(a)\end{pmatrix}.
$$
and consider first the case $a<b$. So you have just $(-1,2)$ as a critical point.
Further, the Hessian matrix of $F$ at $(-1,2)$
$$
H_f(-1,2)=\begin{pmatrix}-3&0\\0&-3\end{pmatrix}
$$
yields, that $(-1,2)$ is a local maximum of $F$.
Since $F(a,a)=0$ and $F(-1,2)>0$ you can drop the boundary $a=b$.
Finally you can check that $F(a,b)\to c\in [-\infty,0]$ for $\|(a,b)\|\to \infty$ (with the restriction $a<b$) while $F(-1,2)>0$. From this you can deduce that $(-1,2)$ has to be the global maximum of $F$.
For the final step you also can show that $F(a,b)<0$ if $a>2$ or $b<-1$. Hence $F$ is nonpositive outside of a bounded area and the positive local maximum has to be the global maximum.
