I want to use the maximum principle to find the optimal solution as a function of states $x_0,...,x_T$ and state the optimal controls u_t^* and costates p_{t+1} as functions of states.
We only had the case of for $u_t$ in a closed interval where you could pick the maximum value, but in this case I am not sure how to start, I'd be glad for suggestions!
$\max_{\{u_t\}{T\\ t=0}} \ \ \sum_{t = 0}^{T}-\frac{1}{2}(x_t^2+u_t^2)$
subject to: $$u_t \in R,\ \ \ t= 0, ... T,$$ $$x_{t+1} = x_t + u_t,\ \ \ t = 0, ... T-1,$$ $x_0$ given.