Given problem is
$J[y] =\int_{0}^{x_1}y'^2dx$ with $y(0)=0$ and $y(x_1)=-x_1-1$.
After solving Euler Lagrange equation I got $y=Ax+B$ .
And using first boundry conditon I got $y=Ax$
We have transversatity condition $[F+(\phi'-y')F_{y'}]=0 $ at $x=x_1$.
But solving this I am getting $A=0$ but the solution is given as $y = - 2 x \,, x_1= 1.$
Any help will be appreciated.