Originally Posted by

**OliviaB** Let $\displaystyle \displaystyle \ f(t, x, \dot{x}) = \dot{x}^2 + 2x \dot{x}$ . Then the Euler-Lagrange equation is $\displaystyle \displaystyle \ \frac{\partial f}{\partial x} - \frac{d}{dx} \Big( \frac{\partial f}{\partial \dot{x}} \Big) = 0$ Should be d/dt, not d/dx.

which implies $\displaystyle \displaystyle \ 2 \dot{x} - \frac{d}{dx} \Big( 2 \dot{x} + 2x \Big) = 0$

$\displaystyle \displaystyle \ \therefore \ 2 \dot{x} - \ddot{x} + 2 \dot{x} = 0$ Middle coefficient is –2, not –1 (corrected in following line).

$\displaystyle \displaystyle \ \therefore \ 2 \ddot{x} - 4 \dot{x} = 0$ which has general solution $\displaystyle x = A + Be^{2t}$.

Now using the endpoint conditions $\displaystyle x(0) = 1 = A + B \ \Rightarrow \ B = 1 - A$

Transversality Condition $\displaystyle \Rightarrow$

$\displaystyle \displaystyle \frac{\partial f}{\partial \dot{x}} (T) = 0 \ \Rightarrow \frac{\partial f}{\partial \dot{x}} (2) = 0$

$\displaystyle \displaystyle \therefore \ 2 \dot{x} (2) + 2x(2) = 0$

Recall that $\displaystyle x = A + Be^{2t}$ so $\displaystyle \dot{x} = At + \frac{1}{2} Be^{2t}$ You should be differentiating x, not integrating it !