<s>[INST] How to find $\max\int_{a}^{b}\left (\frac{3}{4}-x-x^2 \right )\,dx$ over all possible values of $a$ and $b$, $(aI 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$.
 [/INST] Given $$f(a,b) = \int_{a}^{b}\left(\frac{3}{4}-x-x^2\right)dx$$
Do the integration to get:
$$f(a,b) = \frac{a^3}{3}+\frac{a^2}{2}-\frac{3 a}{4}-\frac{b^3}{3}-\frac{b^2}{2}+\frac{3 b}{4} $$
Diff  $f(a,b)$ with w.r.t $a$ and set  to $0$
$$a^2+a-\frac{3}{4} =0$$
Solve. We get these $2$ critical points:
$$a = - \frac{3}{2} \ \  a=\frac{1}{2} $$
Diff  $f(a,b)$ with wrt $b$ and set to $0$
$$-b^2-b+\frac{3}{4} = 0$$
We get these $2$ critical points:
$$ b = - \frac{3}{2} \ \ b=\frac{1}{2} $$
only $\displaystyle a = -\frac{3}{2}  \ \  b = \frac{1}{2} $ need to be tried. $( a < b )$
$$f\left( - \frac{3}{2} , \frac{1}{2}\right) = \frac{4}{3} .$$
</s>