The problem is to maximize $\int_0^1 y(t) + u(t)^2 dt$ where $y$ is state and $u$ is control.
Further we have $y' = u, y(0) = 5$.
I set up the Maximum Principle equations, but, in particular, I need to maximize the Hamiltonian in the $u$-variable.
My nstructor's solutions does this by differentiating and letting it equal zero, i.e. he gets $$2u(t) + \lambda = 0.$$
Then he goes on with the other equations, and sovles for $\lambda$, and then $u$.
However, if we differentiate the Hamiltonian again with respect to $u$, then we get $$2 > 0$$ which is not negative, hence surely the 1st equation is not warranted, as we have found a minimum, not maximum?