TITLE: How to find $\max\int_{a}^{b}\left (\frac{3}{4}-x-x^2 \right )\,dx$ over all possible values of $a$ and $b$, $(a<b)$?
QUESTION [6 upvotes]: I tried finding the maxima of $f(x)=\frac{3}{4}-x-x^2$ by taking the derivative and so on and use the fact that $\displaystyle\int_{a}^{b}f(x)\,dx \leq M(b-a)$ where $M$ is the global maximum, but then the maximum value depends on the values of $a$ and $b$.

REPLY [2 votes]: Evaluating the integrand and solving the optimisation problem (as in marwalix and juantheron's answers) is quite unnecessary. Simply notice that the integrand is a parabola which is positive on $[-3/2, 1 /2]$ and negative everywhere else. Therefore the integral is greatest when it is taken only on the largest interval where the integrand is positive, namely when $a=-3/2$ and $b=1 /2$,