Doubt - Optimal Control Theory Problem with transversality condition 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.
 A: The problem is that the condition on the Lagrange multiplier $\lambda(1)=0$ doesn't apply here (recall this condition arises from the derivation of the Euler-Lagrange equations with the boundary term coming from the integration by parts step). Since the point $y_1$ is presumably fixed, assuming anything about $\lambda(1)$ overdetermines the resulting system of necessary optimality conditions.
As far as solving your system is concerned for completeness of this answer, note that, fortuitously,
$$u=\frac{\lambda}{2}-y
$$
implies
$$\dot{y}=u+y=\frac{\lambda}{2}.
$$
Now since
$$\frac{\delta V}{\delta\lambda}=0\to2u+4y-\dot{\lambda}-\lambda=2y-\dot{\lambda}=0,
$$
after substituting in for u, we find after differentiating the equation for $\dot{y}$, the following boundary value problem
$$\ddot{y}-y=0,\quad y(0)=0,\ y(1)=y_1
$$
whose simple solution is given by
$$y(t)=\frac{y_1}{\sinh1}\sinh t.
$$
For completeness, the lagrange multiplier is
$$\lambda=2\dot{y}=2\frac{y_1}{\sinh1}\cosh t,
$$
therefore the optimal control is given by
$$u=\frac{\lambda}{2}-y=\frac{y_1}{\sinh1}\cosh t-\frac{y_1}{\sinh1}\sinh t=\frac{y_1}{\sinh1}e^{-t}.
$$
A: 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.
