The problem is: $max \int_{-1}^1 (tx - u^2) dt$ where $\dot{x} = x + u^2, u(t) \in [0,1]$ for every $t \in [-1, 1]$
End points: $x(-1) = 0, x(1) = e^2 - e^{1 + \frac{1}{e}} $
I need to find an optimal pair x*, u* which maximizes the given problem.
Hamiltonian is $H(t, x, u, p) = tx - u^2 + px + pu^2$
So i started with finding u*(t) which is:
$ u^*(t) = \begin{cases} 1 & \text{ if p(t) >= 1} \\ 0 & \text{ if p(t) < 1} \\ \end{cases} $
since u is maximized when $\frac{\partial H}{\partial u} = 0 = 2(p-1)u$
And from the mangasarian maximum principle $\dot{p} = -(t+p)$ which has general solution $p(t) = Ae^{-t} -t + 1$
I'm not sure what to do next. The hint given in the exercise is: Try with p(t) < 1 on an interval $(t_0, 1]$, where p is the adjoint function to the problem
I don't see how i can find this $t_0$ where p(t) < 1, when the constant A is unkown and has no condition required from the Maximum principle
UPDATE: I think i'm on to something. Will post soon as i know more.