# Questions regarding solving the Brachistochrone problem using Lagrangian

brachistochrone problem: Suppose that there is a rollercoaster. There is point 1 ($0,0$) and point 2 ($x_2, y_2)$. Point 1 is at the higher place when compared to the point 2, so the rollercoaster rolls down from point 1 to point 2. Assuming no friction, we want to build a rollercoaster path from point 1 to point 2, so that the rollercoaster will reach point 2 from point 1 in shortest time.

So, time taken would be defined as $$\text{time (1} \rightarrow 2) = \int_1^2 \frac{ds}{v}$$

Then, the textbook says that v=$\sqrt{2gy}$.

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

Then, $$\text{time (1} \rightarrow 2) = \frac{1}{\sqrt{2g}} \int_0^{y_2} \frac{\sqrt{x'(y)^2 + 1}}{\sqrt{y}} \, dy$$

Then, $f(x,x',y)$ is defined as $$f(x,x',y)=\frac{\sqrt{x'(y)^2 + 1}}{\sqrt{y}}$$

As per Euler-Lagrange equation,

$$\frac{\partial f}{\partial x} = \frac{d}{dy}\frac{\partial f}{\partial x'}$$

The left-hand would be zero, so $$\frac{\partial f}{\partial x'} = \text{constant} = \frac{1}{2a}$$

Then $$x' = \sqrt{\frac{y}{2a-y}}$$ and $$x = \int \sqrt{\frac{y}{2a-y}} \, dy$$

The textbook then says that substituting $y=a(1-\cos\theta)$ would aid solving the integral.

How does this make sense?

-
well... it's not homework, but anyway. – War Oct 18 '12 at 8:39
So, where are you unsure of what is going on? Just reducing the final integral or earlier? – dmckee Oct 18 '12 at 13:06
Yes, just the last two integrals, as the last sentences say. – War Oct 18 '12 at 13:51

Here, the idea is to introduce $\theta$ such that $y=a(1-\cos\theta)$ or, equivalently, defining $\theta=\arccos(1-y/a)$. How $\theta$ was guessed ? It's difficult to tell, but it happens to simplify the last integral. Under this change of variable, we have $$dy=d(a(1-\cos\theta))=a\sin\theta d\theta=a\sqrt{1-\cos^2\theta}d\theta,$$ so the integral becomes $$x = \int \sqrt{\frac{y}{2a-y}} \, dy =\int a\sqrt{\frac{(1-\cos\theta)(1-\cos^2\theta)}{1+\cos\theta}}d\theta$$ which is simpler to integrate.
Then, how can we show that y is in the range covered by $a(1-\cos\theta)$? – War Oct 18 '12 at 14:58
Because $a$ comes from an integration constant and is arbitrary. It is not a parameter of the initial problem. – Frédéric Grosshans Oct 18 '12 at 15:07