Find the lagrangian and Euler-Cauchy equation for a pendulum in $\mathbb{R}^3$, under action of gravity $f=(0,0,-mg)$, free to move in a horizontal plane, but with origin stucked in $x_3$ axis. Show that the configuration space, in this case, is an infinite cilinder. Find the solution of this problem with the constraint.
Here is my attempt:
$-\nabla U = f$
$\nabla U = (0,0,mg)$
$U(q) = U(x_1,x_2,x_3) = mgx_3 + C$
Let $C=0$
$L(q,q') = \frac{m||q'||^2}{2} -U(q) = \frac{m||q'||^2}{2} - mgx_3$
$\frac{\partial}{\partial x_1}L - \frac{d}{dt}\frac{\partial }{\partial x_1'}L = 0 \implies mx_1''=0$
$\frac{\partial}{\partial x_2}L - \frac{d}{dt}\frac{\partial }{\partial x_2'}L = 0 \implies mx_2''=0$
$\frac{\partial}{\partial x_3}L - \frac{d}{dt}\frac{\partial }{\partial x_3'}L = 0 \implies mg+mx_3''=0$
So I found these three Euler-Lagrange equations, but I didn't use the constraint in my calculations, I'm not sure if what I'm doing is correct...
Thanks.
Once you've obtained the Lagrangian, I recommend working in polar coordinates rather than Cartesian ones, as is typical when studying pendula because the pendulum length adds a constraint that reduces the phase space dimension. An infinite-cylinder phase space is $2$-dimensional; no surprises there, because the phase coordinates should be the polar angle $\theta$ and its momentum $p_\theta$. The most famous pendulum is in a vertical plane, and its path through phase space is oscillatory in both variables, with the obvious constraint $\theta\in [0,\,2\pi]$ when we work in the usual coordinate system for angles. If you subject the pendulum in your question to a similar analysis, you should see why the phase space is a cylinder (albeit an infinitely long one) instead of, say, a flat plane.