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.
Here $\phi=-x-1$
So transversatity condition will give us $A^2+[-1-A ]2A=0$
$\Longrightarrow$ $A^2-2A-2A^2=0$
$\Longrightarrow$ Either $A=0 $ or $A=-2$
But we also have $y(x_1)=Ax_1$
$\Longrightarrow$ $-x_1-1=Ax_1$
$\Longrightarrow$ $A=-{1\over x_1}-1$
$\Longrightarrow$ $x_1=-{1\over A+1}$
$\Longrightarrow$ $x_1=1$
Therefore $y=-2x$ and $x_1=1$
I had made a mistake therefore I was getting wrong answer.