# Thread: Finding the extremal for a functional

1. ## Finding the extremal for a functional

Find the extremal for

$\int_0^T (\dot{x}^2 + 2x\dot{x} + 2x^2) dt\,when\,x(0)=1\,and\,T=2 (i.e\,x(2)\,free)$

Now I have done most of the question as follows

$\frac{\partial f}{\partial x} - \frac{d}{dt}*\frac{\partial f}{\partial \dot{x}} = 2\dot{x} + 4x - \frac{d}{dt}(2\dot{x}+2x) = 0$

which cancels down to

$-2\ddot{x}+4x = 0$

then when you solve the ODE you get

$x(t) = Ae^{sqrt(2)t} + Be^{-sqrt(2)t}$

then subbing in the first bound of $x(0)=1$ we get $A+B=1$

I believe I have done this part correctly

Now, I have got no clue how to do the other bound. Can somebody please show me how to do it

2. ## Re: Finding the extremal for a functional

You now have the form of $x(t).$ Why not sub. into the integral and integrate?