I'm trying to solve this optimal control theory problem, but i'm having some problem finding the constants $k_1$ and $k_2$. I will show what I have developed so far.
The problem:
$$V(y)=\int_{0}^{1}u^2+2yu+2y^2\,dt$$ with $$y'=y+u;\quad y(0)=0;\quad y(1)=y_{1}$$ where $y(1)$ can vary and $T=1$ is given.
I will skip all the calculations, but after finding the Hamiltonian and applying the canonic equations and solving the system of differential equations I have:
\begin{align} u&=-y-\frac{1}{2}\lambda\\ y&=-\frac{1}{2}k_1e^t+\frac{1}{2}k_2e^{-t}\\ \lambda&=k_1e^t+k_2e^{-t} \end{align}
I should use the initial condition $y(0)=0$ and the traversality condition $\lambda(T=1)=0$ to find $k_1$ and $k_2$. But I don't know why, I can't solve these simple system:
\begin{align} y(0)&=-\frac{1}{2}k_1+\frac{1}{2}k_2=0\\ \lambda(T=1)&=k_1e+k_2e^{-1}=0 \end{align}
I find $k_1=k_2=0$ which seems wrong to me.
Did I miss something in the process?
Thank you very much.
Your solution is fine. Note that if $$H = u^2+2yu+2y^2 + \lambda(y + u)$$ then $$\frac{\partial H}{\partial u} = 2u + 2y + \lambda$$ and $$\frac{\partial^{2} H}{\partial u^{2}} = 2 > 0,$$ which means that this is a minimization problem. It's not unreasonable to expect a minimization problem involving several squares and a product to have its minimum when the state and control are zero, particularly when the differential equation for $y$, along with the initial condition, tell us that $yu \ge 0$ at least initially.