I have to show that the stationary path of the functional
$$S[y]=\int\limits_{0}^{v}(y'^2+y^2) \,\mathrm d x, \qquad y(0)=1, \qquad y(v)=v$$
is given by
$$y=\cosh x + B \sinh x$$
where
$$B^2-1=2 \sinh v + 2B \cosh x$$
I have found the Euler-Langrange equation to be
$$y''-y=0$$
which has the solution
$$y = A \cosh x + B \sinh x$$
If I put $x=y=0$ in, I find $A=1$. If i put $x=v, y=v$, I get
$$v = \cosh v + B \sinh v$$
but I can't get the other equation for $B^2-1$. How to i derive this one?
The EL-equation gives: $y''-y= 0$, solving with the first BC gives$$y =\cosh x + B \sinh x$$ for $0 \leq x \leq v$. The Right hand endpoint of the SP lies on the line: $\tau(x,y) =y-x=0$ so that the transversality condition is: $$\tau_xF_{y'} + \tau_y(y'F_{y'}-F)=0$$ at $x=v$ where $F=y'^2+y^2$ giving:
$$-2y' + (2y'^2 -(y'^2 + y^2)) = -2y' + y'^2-y^2 = 0$$ substituting for y and y' at $x=v$ gives: $$-2(\sinh v + B \cosh v) +(\sinh v + B \cosh v)^2 - (\cosh v + B \sinh v)^2 =0$$ So that on expanding and simplifying using $\cosh^2 v + \sinh^2 v=1$ you obtain: $B^2-1 = 2 \sinh v + 2B \cosh v$ with the condition $x=v$, $y=x$ you have: $$v= \cosh v + B \sinh v$$ $$B^2-1 = 2 \sinh v + 2B \cosh v$$ as required