# Math Help - Extremal trouble

1. ## Extremal trouble

Find the extremals of $\int_0^2 \big ( \dot{x}^2 + 2 \dot{x} \big ) dt$ with $x(0) = 0$ and $x(2) = 1$ subject to the constraint $\int_0^2 x \ dt = 2$

2. What ideas have you had so far?

3. Okay, first of all, could you please what extremals are in a physical sense? I don't quite understand that.

Anyway, I haven't got very far, but here is what I have.

Since $f = \dot{x}^2 + 2 \dot{x}$ is independent of $t$, it follows from the Euler-Lagrange equation that

$f - \dot{x} = \frac{\partial f}{\partial \dot{x}} = \text{constant}$

so

$\dot{x}^2 + 2x - \dot{x}(2 \dot{x} + 2) = \text{constant}$

$-\dot{x}^2 - 2\dot{x} + 2x = C$
$-2(\dot{x}^2 + 2 \dot{x} - x) = C$

Therefore
$\dot{x}^2 + \dot{x} = - \frac{C}{2} + x$

I don't really know where to go from here.

4. You're doing calculus of variations here. Calculus of variations is all about finding functions that maximize or minimize a functional. A functional, in this case, maps functions to numbers. Your functional in this problem is

$\displaystyle{f[t,x,\dot{x}]=\int_{0}^{2}(\dot{x}^{2}+2\dot{x})\,dt}.$

So you have to find an extremum, or extremal, (doesn't matter if it's a min or a max) of this functional over the collection of functions $x(t)$ such that

$x(0)=0, x(2)=1,$ and $\displaystyle{\int_{0}^{2}x(t)\,dt=2}.$

I don't think your application of the Euler-Lagrange equations is correct. Moreover, in order to satisfy the integral constraint of

$\displaystyle{\int_{0}^{2}x(t)\,dt=2},$ I think you're going to have to use the method of Lagrange multipliers. You should incorporate the Lagrange multiplier before you apply the Euler-Lagrange equation.

Does any of this ring a bell?

5. Originally Posted by Ackbeet
I think you're going to have to use the method of Lagrange multipliers. You should incorporate the Lagrange multiplier before you apply the Euler-Lagrange equation.

Does any of this ring a bell?
Yes, when I originally posted this we hadn't done it in class yet and I was trying to get ahead. Now I have something......

Define $\displaystyle J[x] = \int_0^2 \dot{x}^2 + 2 \dot{x} \ dt$

and $\displaystyle I[x] = \int_0^2 x \ dt$

The Lagrangian is

$\displaystyle L[x] = J[x] + \lambda I[x]$

$= \int_0^2 \dot{x}^2 + 2 \dot{x} + \lambda x \ dt$

We can apply the Euler-Lagrange equation to obtain

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

and therefore

$\displaystyle \lambda - 2 \ddot{x} - 2 \dot{x} = 0$

So $\displaystyle \ddot{x} + \dot{x} = \frac{\lambda}{2}$

$\displaystyle x(t) = -e^{-t} C + \frac{1}{2} \lambda t + k$ (where c is a constant and k is a constant)

Then from $x(0) = 0$ we have $k = c$

using $x(2) = 1 \ \Rightarrow \ e^{-2} C + \lambda + k$

$\displaystyle C = \frac{\lambda + k - 1}{e^{-2}}$

Using the constraint $I[x] = 2$,

$\displaystyle \int_0^2 x \ dt = 2$

$\displaystyle \int_0^2 -e^{-t} C + \frac{1}{2} \lambda t + k = 2$

and here is where I am having trouble. I don't think the next line is correct.

$\displaystyle \int_0^2 \frac{-e^-t \lambda + k -1}{e^{-2}} + \frac{1}{2} \lambda t + C \dt = 2$

6. I don't think you're applying the B.C. x(2) = 1 correctly. Everything looks good up until that point. What I would do is this: once you've applied the B.C. x(0) = 0, you find out that C = k. So re-write x(t) using the value for k. Then apply the second boundary condition. That'll give you an equation relating lambda to C (assuming you've eliminated k - you could just as easily eliminate C. It will make no difference in the final answer.) Then apply the constraint equation. And no, I don't think you're applying the constraint equation correctly, either. Check that again, but with using the method I've outlined.

7. Okay. So we have determined that $k = c$.

Then $x(t)$ becomes

$\displaystyle x(t) = -e^{-t} k + \frac{1}{2} \lambda t + k$

using $x(2) = 1 \ \Rightarrow \-e^{-2}k + \lambda + k = 1$

so

$k={\frac {\lambda-1}{{{\rm e}^{-2}}+1}}$

Using the constraint $I[x] = 2$,

$\displaystyle \int_0^2 -e^{-t} k + \frac{1}{2} \lambda t + k = 2$

$\displaystyle \int_0^2 -e^{-t} {\frac {\lambda-1}{{{\rm e}^{-2}}+1}} + \frac{1}{2} \lambda t + {\frac {\lambda-1}{{{\rm e}^{-2}}+1}} = 2$

$\Big[{\frac {{{\rm e}^{-t}}\lambda-t}{{{\rm e}^{-2}}+1}}+ \frac{1}{4}\lambda\,{t}^
{2}+{\frac { \left( \lambda-1 \right) t}{{{\rm e}^{-2}}+1}}
\Big]_0^2 = 2$

$\therefore \2\,{\frac {\lambda+\lambda\,{{\rm e}^{-2}}-2}{{{\rm e}^{-2}}+1}} = 2$

Solving for Lambda....

$\lambda = \frac{e^{-2} + 3}{e^{-2} + 1}$

Substituting back into k we have.....

$k = \frac{2e^4}{(1 +e^2)^2}$

which can be subbed back into x for the extremal

8. You've still got a sign error in applying x(2) = 1. So here's how you get good at algebra: pretend someone is holding a gun to your head, and if you make a mistake, that someone is going to pull the trigger! Or, you can just work in a high-energy physics lab. With those 10,000 volt wires running around, if you make a mistake, you're dead.

9. Originally Posted by Ackbeet
You've still got a sign error in applying x(2) = 1. So here's how you get good at algebra: pretend someone is holding a gun to your head, and if you make a mistake, that someone is going to pull the trigger! Or, you can just work in a high-energy physics lab. With those 10,000 volt wires running around, if you make a mistake, you're dead.

Working in a high-energy physics lab with 10,000 volt wires running around.....check.

Standing over a tank full of ill-tempered mutated see Bass and sharks with frickin laser-beams attached to their head for good measure....check.

Working through carefully this time I find the extremal to be

$x = \frac{1}{2}{{\rm e}^{-t+2}}+ \frac{3}{4}t- \frac{1}{4}t{{\rm e}^{2}}+ \frac{1}{2}{{\rm e}^{2}}$

which at $t = 0, x = 0$ and at $t = 2 , x = 1$

I'm alive!