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.