Find numbers $a\leq b$ that maximize the value of the integral $\int_a^ba-x-x^2dx$ I'm trying to find numbers $a\leq b$ that maximize the value of the integral $\int_a^ba-x-x^2dx$. I tried computing the integral and i got the function in two variables
$$f(a,b)=\int_a^ba-x-x^2dx=ab-\frac{b^2}2-\frac{b^3}3-\frac{a^2}2+\frac{a^3}3$$
Then I applied multivariate calculus and I obtained that the only critical point satisfying $a\leq b$ is $(0,0)$. But I can't classify that point since the determinant of the second partial derivatives is zero, so If it is going to be a maximum I have to show that if $a\leq b$ are numbers not both zero then the integral is negative. Is this argument correct? If it is, how do I show that that is a negative number?

We have that $$ab - \frac{b^2}{2} - \frac{b^3}{3} - \frac{a^2}{2} + \frac{a^3}{3} \leq 0 \iff ab + \frac{a^3}{3} \leq \frac{a^2}{2} + \frac{b^2}{2} + \frac{b^3}{3} \ \ \ \ \ \ \ (I)$$
To prove this inequality holds, note that
$$0 \leq \left( \frac{a}{\sqrt{2}} - \frac{b}{\sqrt{2}} \right)^2 = \frac{a^2}{2} - ab + \frac{b^2}{2},$$
which is equivalent to 
$$ab \leq \frac{a^2}{2} + \frac{b^2}{2}.$$
From this we have that
$$ab + \frac{a^3}{3} \leq \frac{a^2}{2} + \frac{b^2}{2} + \frac{a^3}{3} \leq \frac{a^2}{2} + \frac{b^2}{2} + \frac{b^3}{3}.$$
Using the fact that $\frac{a^3}{3} \leq  \frac{b^3}{3}$. This proves the inequality $(I)$.
