I'm somewhat baffled: I have a problem in calculus of variations:
$$ \int_0^T \!(x-\dot x^2)dt,\qquad x(0)=0,\qquad x(T)=T^2-2. $$
Let $ F(t,x, \dot x) =x-\dot x^2. $
I calculate all the necessary derivatives: $$F_x=1 \qquad F_{\dot x} = -2\dot x \qquad \frac{d}{dt}F_{\dot x} = -2\ddot x$$
and write down an Euler-Lagrange equation: $1+2\ddot x=0$
And calculate my quotients: $$x=c_1t+c_2-\frac{t^2}{4} \qquad x(0)=0 \Longrightarrow c_2=0$$
And then I get stuck: I know that if I have $$ J = \int_{t_1}^{t_2} F(t,x,\dot x) dt $$and the right end follows a curve $x=\varphi(t)$, the transversality condition should hold: $$ F(t_2,x_2, \dot x_2) + [\dot \varphi(t_2)-\dot x_2]F_{\dot x}(t_2,x_2, \dot x_2) =0 $$ where $x_2=x(t_2)$.
But I can't wrap my mind about it: what is $\varphi$ in my case, and how would the transversality equation look like? Please help with any hints.