I'm having some problem finding the optimal trajectory $y^*(t)$:
$$V(y)=\int_{0}^{3}(y'+40t^3y)dt$$ with $y(0)=2$ and $y(3)=y_3$, with $y_3$ varying.
Basically, when I apply the Euler-Lagrange equation, the result is: $$F_{y}-\frac{dF_{y'}}{dt}=40t^3-0=0$$
Which doesn't make sense to me.
Thank you very much.