## extremal

find the extremal for
$\int^{T}_{0} (\dot{x}^2 + 2x\dot{x} + 2x^2) dt$
when $x(0) = 1$ and $T = 2$ i.e. $x(2)$ free.

i get $x = Ae^{\sqrt{2}t} + Be^{-\sqrt{2}t}$
and the first condition $x(0) = 1$ gives $A + B = 1$
then when i apply the transversality condition $T = 2$
ie. $\frac{df}{d\dot{x}}(2) = 0$
it gets really complicated. can someone please tell me if i have the correct equation for $x$?