Hi,

I got some help with some worked examples here (thanks Ackbeet).

I'm now trying a question from my text to see if I understand it correctly. Do I have the right idea?

Find the extremal for the following:

$\displaystyle \int_1^2 \ \frac{2t \dot{x} + \dot{x}^2}{t^2} dt$ with $\displaystyle x(1) = 0, x(2) = 4$.

Let $\displaystyle f(t, x, \dot{x})= \frac{2t \dot{x} + \dot{x}^2}{t^2} $

Then Euler-Lagrange eqn is

$\displaystyle

\frac{\partial f}{\partial x} - \frac{d}{dt} \big ( \frac{\partial f}{\partial \dot{x}} \big ) = 0$

So -

$\displaystyle 0 - \frac{d}{dt} \big ( \frac{2t + 2 \dot{x}}{t^2} \big )= 0$

Integrating $\displaystyle \int \frac{2t + 2 \dot{x}}{t^2} dt$ we get

$\displaystyle - \frac{2}{t} - \frac{\dot{x}}{t^2} = 0$

$\displaystyle \therefore \ \frac{\dot{x}}{t} = C - \frac{2}{t}$

$\displaystyle \dot{x} = Ct - 2$ where C is a constant.

Now - Integrate with respect to $\displaystyle t$ and we get

$\displaystyle x = \frac{1}{2} Ct^2 - 2t + l$

so $\displaystyle x = x(t) = kt^2 - 2t + l$ where $\displaystyle k = \frac{C}{2}$

Using $\displaystyle x(1) = 2$ and $\displaystyle x(2) = 4$ we have

$\displaystyle x(1) = k - 2 + l = 0 $ and $\displaystyle x(2) = 4k - 4 + l = 4$

Solving these we get $\displaystyle l = 0, k = 2$

so the extremal is $\displaystyle x = 2t^2 - 4$. Is this right or did I stuff something?