How Can You Optimize Travel Time with Varying Speeds in Calculus of Variations?

touqra
Messages
284
Reaction score
0
I have another difficult question regarding calculus of variations.
A particle travels in the (x,y) plane has a speed u(y) that depends on the distance of the particle from the x-axis. The direction of travel subtends an angle \theta with the x-axis that can be controlled to give the minimum time to move between two points.
Let u(y) = Ue^{-y/h} whereby, U and h are constants.
If the particles starts at (0,0) and has to get to the point (\pi{h}/4,h) in the shortest time, show that, the final direction is \theta = tan^{-1}(e\sqrt{2}-1)
 
Last edited:
Physics news on Phys.org
touqra said:
I have another difficult question regarding calculus of variations.
A particle travels in the (x,y) plane has a speed u(y) that depends on the distance of the particle from the x-axis. The direction of travel subtends an angle \theta with the x-axis that can be controlled to give the minimum time to move between two points.
Let u(y) = Ue^{-y/h} whereby, U and h are constants.
If the particles starts at (0,0) and has to get to the point (\pi{h}/4,h) in the shortest time, show that, the final direction is \theta = tan^{-1}(e\sqrt{2}-1)

The time it takes to travel from point a to b is given by:

t_{a,b}=\int_{p_1}^{p_2}\frac{ds}{v}

Where s is the arclength and v is the speed. Note that:

ds=\sqrt{dx^2+dy^2}=\sqrt{1+(y^{'})^2}dx

The final direction is just the slope of the extremal function at the end point right?
 
saltydog said:
The time it takes to travel from point a to b is given by:
t_{a,b}=\int_{p_1}^{p_2}\frac{ds}{v}
Where s is the arclength and v is the speed. Note that:
ds=\sqrt{dx^2+dy^2}=\sqrt{1+(y^{'})^2}dx
The final direction is just the slope of the extremal function at the end point right?
yup, that's what I did initially. But, when I used the Euler equation to get me an equation, I have an equation with some unknown constants, ie, U and h. But the final direction which was needed to be proven does not contain any constants.
What I get was:
F=\sqrt{1+y'^2}{e^{y/h}}/U
Using Euler equation and the Beltrami identity (since F is independent of x),
F-{y'}\frac{\partialF}{\partialy'}=constant
\sqrt{1+y'^2}{e^{y/h}}-{y'^2}{(1+y'^2)}^{-1/2}{e^{y/h}}/2= constant
 
Last edited:
touqra said:
yup, that's what I did initially. But, when I used the Euler equation to get me an equation, I have an equation with some unknown constants, ie, U and h. But the final direction which was needed to be proven does not contain any constants.
What I get was:
F=\sqrt{1+y'^2}{e^{y/h}}/U
Using Euler equation and the Beltrami identity (since F is independent of x),
F-{y'}\frac{\partialF}{\partialy'}=constant
\sqrt{1+y'^2}{e^{y/h}}-{y'^2}{(1+y'^2)}^{-1/2}{e^{y/h}}/2= constant

For the moment, let h=1, leave U as just some constant: This is sufficient to lead to the angle you posted above.

So we start here:

t_{a,b}=\int_{p_1}^{p_2}\frac{ds}{v}

and extremize:

\mathbf{T}[y(x)]=\int_{p_1}^{p_2}\frac{\sqrt{1+(y^{'})^2}}{Ue^{-y/h}}dx

(v above in my post is just u(y(x)), the speed of travel)

with the boundary conditions you posted.

so:

F(x,y,y^{'})=\frac{\sqrt{1+(y^{'})^2}}{Ue^{-y/h}}

So we employ Euler's equation and calculate 3 derivatives. Can you post the first two?

\frac{\partial F}{\partial y}=

\frac{\partial F}{\partial y^{'}}=
 
Last edited:
saltydog said:
For the moment, let h=1, leave U as just some constant: This is sufficient to lead to the angle you posted above.
So we start here:
t_{a,b}=\int_{p_1}^{p_2}\frac{ds}{v}
and extremize:
\mathbf{T}[y(x)]=\int_{p_1}^{p_2}\frac{\sqrt{1+(y^{'})^2}}{Ue^{-y/h}}dx
(v above in my post is just u(y(x)), the speed of travel)
with the boundary conditions you posted.
so:
F(x,y,y^{'})=\frac{\sqrt{1+(y^{'})^2}}{Ue^{-y/h}}
So we employ Euler's equation and calculate 3 derivatives. Can you post the first two?
\frac{\partial F}{\partial y}=
\frac{\partial F}{\partial y^{'}}=
I obtain
\frac{\partial F}{\partial y'} = Uy'e^{y/h}/\sqrt{1+y'^2} = J
\frac{\partial F}{\partial y} = U\sqrt{(1+y'^2)}e^{y/h}/h
\frac{dJ}{dx}=\frac{K-L}{M}
where, K = e^{y/h}(1+y'^2)(y''+\frac{y'^2}{h})
L = y''y'e^{y/h}
M = (1+y'^2)\sqrt{(1+y'^2)}
How do you proceed from here?
Why do you say that putting h=1 will give the final angle?
 
Last edited:
Touqra, it looks like you're having problems calculating partials. Looks so, maybe not.

First, let's clean up the functional: Really, if we want to minimize that integral, we can just move U across the integral sign right, and let's put the exponential in the numerator:

\mathbf{T}[y(x)]=\frac{1}{U}\int_{p_1}^{p_2} e^{y/h}\sqrt{1+(y^{'})^2}dx


So:

F(x,y,y^{'})=e^{y/h}\sqrt{1+(y^{'})^2}

and therefore:

\frac{\partial F}{\partial y}=\frac{e^{y/h}\sqrt{1+(y^{'})^2}}{h}

and:

\frac{\partial F}{\partial y^{'}}=\frac{e^{y/h}y^{'}}{\sqrt{1+(y^{'})^2}}

and so:

<br /> \begin{align*}<br /> \frac{d}{dx}\left(\frac{\partial F}{\partial y^{&#039;}}\right)&amp;=\frac{d}{dx}\left[\frac{e^{y/h}y^{&#039;}}{\sqrt{1+(y^{&#039;})^2}}\right] \\<br /> <br /> &amp;=\frac{d}{dx}\left[e^{y/h}y^{&#039;} \cdot \frac{1}{\sqrt{1+(y^{&#039;})^2}}\right] \\<br /> <br /> &amp;=e^{y/h}y^{&#039;}\cdot\frac{-1/2}{(1+(y^{&#039;})^2)^{3/2}}\cdot 2 y^{&#039;}y^{&#039;&#039;} \\<br /> <br /> &amp;+\frac{1}{\sqrt{1+(y^{&#039;})^2}}\left(e^{y/h}y^{&#039;&#039;}+y^{&#039;}\frac{1}{h}y^{&#039;}e^{y/h}\right) \\<br /> <br /> &amp;=\frac{e^{y/h}y^{&#039;&#039;}}{\sqrt{1+(y^{&#039;})^2}}-\frac{e^{y/h}(y^{&#039;})^2y^{&#039;&#039;}}{(1+(y^{&#039;})^2)^{3/2}}+<br /> \frac{e^{y/h}(y^{&#039;})^2}{h\sqrt{1+(y^{&#039;})^2}}<br /> <br /> \end{align}<br />

So, once we obtain the partials, then we substitute them into the Euler equation and equate the expression to zero. Now, can you substitute these expressions into:

\frac{\partial F}{\partial y}-\frac{d}{dx}\left(\frac{\partial F}{\partial y^{&#039;}}\right)=0

simplify, and then post the results?

Also, with regards to h=1: I just worked the problem with that value and obtained the results you indicated. Perhaps it works for any value of h. Not sure.
 
Last edited:
saltydog said:
Touqra, it looks like you're having problems calculating partials. Looks so, maybe not.
First, let's clean up the functional: Really, if we want to minimize that integral, we can just move U across the integral sign right, and let's put the exponential in the numerator:
\mathbf{T}[y(x)]=\frac{1}{U}\int_{p_1}^{p_2} e^{y/h}\sqrt{1+(y^{&#039;})^2}dx
So:
F(x,y,y^{&#039;})=e^{y/h}\sqrt{1+(y^{&#039;})^2}
and therefore:
\frac{\partial F}{\partial y}=\frac{e^{y/h}\sqrt{1+(y^{&#039;})^2}}{h}
and:
\frac{\partial F}{\partial y^{&#039;}}=\frac{e^{y/h}y^{&#039;}}{\sqrt{1+(y^{&#039;})^2}}
and so:
<br /> \begin{align*}<br /> \frac{d}{dx}\left(\frac{\partial F}{\partial y^{&#039;}}\right)&amp;=\frac{d}{dx}\left[\frac{e^{y/h}y^{&#039;}}{\sqrt{1+(y^{&#039;})^2}}\right] \\<br /> &amp;=\frac{d}{dx}\left[e^{y/h}y^{&#039;} \cdot \frac{1}{\sqrt{1+(y^{&#039;})^2}}\right] \\<br /> &amp;=e^{y/h}y^{&#039;}\cdot\frac{-1/2}{(1+(y^{&#039;})^2)^{3/2}}\cdot 2 y^{&#039;}y^{&#039;&#039;} \\<br /> &amp;+\frac{1}{\sqrt{1+(y^{&#039;})^2}}\left(e^{y/h}y^{&#039;&#039;}+y^{&#039;}\frac{1}{h}y^{&#039;}e^{y/h}\right) \\<br /> &amp;=\frac{e^{y/h}y^{&#039;&#039;}}{\sqrt{1+(y^{&#039;})^2}}-\frac{e^{y/h}(y^{&#039;})^2y^{&#039;&#039;}}{(1+(y^{&#039;})^2)^{3/2}}+<br /> \frac{e^{y/h}(y^{&#039;})^2}{h\sqrt{1+(y^{&#039;})^2}}<br /> \end{align}<br />
So, once we obtain the partials, then we substitute them into the Euler equation and equate the expression to zero. Now, can you substitute these expressions into:
\frac{\partial F}{\partial y}-\frac{d}{dx}\left(\frac{\partial F}{\partial y^{&#039;}}\right)=0
simplify, and then post the results?
Also, with regards to h=1: I just worked the problem with that value and obtained the results you indicated. Perhaps it works for any value of h. Not sure.
I simplified the result and obtained
hy&#039;&#039; = 1 + y&#039;^2
solving the above equation, we have
y&#039; = tan (\frac{(x+c)}{h})
since, y&#039; = tan (angle)
this means, angle of direction = \frac{(x+c)}{h}
Then, how do I proceed?
 
touqra said:
I simplified the result and obtained
hy&#039;&#039; = 1 + y&#039;^2
solving the above equation, we have
y&#039; = tan (\frac{(x+c)}{h})
since, y&#039; = tan (angle)
this means, angle of direction = \frac{(x+c)}{h}
Then, how do I proceed?

Well, would be nice to integrate it one more time to get the actual function y(x). That of course brings in another constant of integration. But you have two boundary condtions right? Two equation, two unknowns, little algebra, should be able to figure out what the constants are.

Edit: Oh yea, just use h=1.
 
saltydog said:
Well, would be nice to integrate it one more time to get the actual function y(x). That of course brings in another constant of integration. But you have two boundary condtions right? Two equation, two unknowns, little algebra, should be able to figure out what the constants are.
Edit: Oh yea, just use h=1.

Thanks. I got it.
But I still have to figure out why h=1 works. When I didn't make that assumption, it turns out that I have e^h. h = 1 works because e^h = e
Hmmm...
 
Back
Top