I'm solving an exercise about the Lagrange-Euler equations, that states the following:

Let $\gamma (t) = \{ (t,q) : q = q(t), t_0 \leq t \leq t_1\}$ be a curve in $\mathbb{R} \times \mathbb{R}^2$. Further let $F(q,\dot{q},t)$ be the function from $\mathbb{R}^2 \times \mathbb{R}^2 \times \mathbb{R} \rightarrow \mathbb{R}$ for which the functional $\Phi = \int_{t_0}^{t_1} F(q,\dot{q},t) dt$ is the length of the curve.

(a) Which is the form of $\Phi$ in cartesian coordinates? Which is its form in polar coordinates?

(b) Give the Euler-Lagrange equations in both coordinate systems.

(c) Solve the differential equations in both coordinate systems and show that the solutions are the same.

Now, my problem begins with giving the form of $\Phi$. I found that the element of length in cartesian coordinates is $ds = \sqrt{dx^2 + dy^2}$, so with $$\int ds = \int \frac{ds}{dt} dt = \int \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dx}{dt}\right)^2} dt,$$ We find that $\Phi = \int_{t_0}^{t_1} ||\dot{\gamma}(t)|| dt$. Now, my plan is finding the element of length in polar coordinates, and plugging in the respective expressions in terms of $\gamma$. The problem is that I don't see how to find the element of length in polar coordinates. I looked it up on Wikipedia, and found $ds^2 = dr^2 + r^2 d\theta^2$. Now, for $dr^2$ I would plug in $||\dot{\gamma} (t)||^2$, for $r^2$ I'd set $||\gamma (t)||^2$, and for $d\theta$ I have no idea.

Can you help me, especially with the derivation of the polar line element and the form of $\Phi$ in polar coordinates?

Set $x = r \cos \theta$, $y = r \sin \theta$. Taking the total differentials, $$\mbox{d}x = \mbox{d}r \cos \theta - r \sin \theta \mbox{d} \theta,$$

$$\mbox{d}y = \mbox{d}r \sin \theta + r \cos \theta \mbox{d} \theta.$$

Squaring and simplifyng

$$\mbox{d}s^2 = {\mbox{d}x}^2 + {\mbox{d}y}^2 = {\mbox{d}r}^2 + r^2 {\mbox{d}\theta}^2.$$

Hence $$\frac{\mbox{d}s}{\mbox{d} t} \mbox{d} t = \sqrt{ \left( \frac{\mbox{d}r}{\mbox{d}t}\right)^2 + r^2 \left( \frac{\mbox{d}\theta}{\mbox{d}t}\right)^2 }\, \mbox{d}t.$$

Now, the property of being extremal is a characteristic of the curve, not of the coordinate system, so it is independent on the local chart you choose. In particular, the Euler-Lagrange equation retains the same form in both systems (obviously, one changes the labels: $(x,y) \to (r,\theta)$). This remarks answer to point $(a)$ and $(b)$. Point $(c)$ is a simple verification you can do eventually after have inverted the previous relations between $(x,y)$ and $(r,\theta)$.

For a brilliant discussion of this and more subtle points, let's see Arnold, Mathematical methods of classical mechanics, Paragraph 12.C, 12.D.

For the polar coordinates expression. simply "divide" the line element in polar coordinates by $$dt^2$$ to obtain \begin{align} \left(\frac{ds}{dt}\right)^2 = \left(\frac{dr}{dt}\right)^2 + r^2\left(\frac{d\theta}{dt}\right)^2 \end{align} so in polar coordinates, one has \begin{align} \|\dot\gamma(t)\| = \sqrt{\dot r^2 + r^2\dot\theta^2} \end{align} and I'll leave the rest to you.

Note. The more rigorous way to do this is to note that in any given coordinates, the Euclidean metric can be written as a $$3\times 3$$ matrix with elements $$g_{ij}$$. The speed is then given by the following expression in terms of the metric components in these coordinates: \begin{align} \|\dot \gamma(t)\| = \sqrt{g_{ij}(\gamma(t))\dot x^i(t)\dot x^j(t)} \end{align} where we have written the curve in components in the given coordinates as $$\gamma(t) = (x^i(t))$$. The manipulations with the line element performed above are equivalent to this. I'll leave it to you to show that the expression given in terms of the metric components gives the same result for the speed.