# Extremal trouble

• Aug 25th 2010, 08:27 PM
Maccaman
Extremal trouble
Find the extremals of $\displaystyle \int_0^2 \big ( \dot{x}^2 + 2 \dot{x} \big ) dt$ with $\displaystyle x(0) = 0$ and $\displaystyle x(2) = 1$ subject to the constraint $\displaystyle \int_0^2 x \ dt = 2$
• Aug 26th 2010, 02:18 AM
Ackbeet
What ideas have you had so far?
• Aug 26th 2010, 04:51 AM
Maccaman
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 $\displaystyle f = \dot{x}^2 + 2 \dot{x}$ is independent of $\displaystyle t$, it follows from the Euler-Lagrange equation that

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

so

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

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

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

I don't really know where to go from here.
• Aug 26th 2010, 05:14 AM
Ackbeet
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 \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 $\displaystyle x(t)$ such that

$\displaystyle x(0)=0, x(2)=1,$ and $\displaystyle \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 \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?
• Sep 11th 2010, 11:52 PM
Maccaman
Quote:

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 \displaystyle J[x] = \int_0^2 \dot{x}^2 + 2 \dot{x} \ dt$

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

The Lagrangian is

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

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

We can apply the Euler-Lagrange equation to obtain

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

and therefore

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

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

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

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

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

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

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

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

$\displaystyle \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 \displaystyle \int_0^2 \frac{-e^-t \lambda + k -1}{e^{-2}} + \frac{1}{2} \lambda t + C \dt = 2$
• Sep 13th 2010, 01:55 AM
Ackbeet
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.
• Sep 14th 2010, 10:23 AM
Maccaman
Okay. So we have determined that $\displaystyle k = c$.

Then $\displaystyle x(t)$ becomes

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

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

so

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

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

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

$\displaystyle \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$

$\displaystyle \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$

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

Solving for Lambda....

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

Substituting back into k we have.....

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

which can be subbed back into x for the extremal
• Sep 14th 2010, 10:59 AM
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.
• Sep 14th 2010, 05:12 PM
Maccaman
Quote:

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

$\displaystyle 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 $\displaystyle t = 0, x = 0$ and at $\displaystyle t = 2 , x = 1$

I'm alive!(Rofl)
• Sep 15th 2010, 01:59 AM
Ackbeet