# Solution to a differential equation appearing in a problem of Hamiltonian mehanics

This is a differential equation I encountered while solving a problem in Hamiltonian mechanics.

Let $A,B,C \in \mathbb{R}$ with some possible restrictions. I wish to find a solution to the initial value problem $$y'(x) = \sqrt{A \cos(y(x)) + \frac{B}{\sin^2 y(x)} + C}$$ with the initial conditions $y(x_0) = y_0$. I recognize that the above differential equation does not make sense for all choices of $A,B,C$ and $y_{x_0}$.

To even get the problem to this staged already required some "tricks", but now I am all out of ideas as to how to continue. Subject to certain constraints such as $A = C = x_0 = 0$, $B > 0$ and $y_0 = \frac{\pi}{2}$, I believe we have a solution $$y(x) = \arccos(\sqrt{B}x) \ .$$ However for non-zero $A$ and $C$ I have no ideas. The equation is slightly reminiscent of the Jacobi elliptic equations.

Any ideas?

Edit : As requested the original problem is to find the equations of motion for a particle constrained to a sphere of radius $R$ subject to a vertical force $\alpha \hat{\mathbf{z}}$. Using spherical coordinates where $\varphi \in [0, 2 \pi)$, $\theta \in [0, \pi)$ we have the Lagrangian $$L(\theta, \dot{\theta}, \varphi, \dot{\varphi}) = \frac{1}{2} m R^2 \left(\dot{\theta}^2 + \sin^2 \theta \dot{\varphi}^2 \right) + \alpha R \cos \theta \ .$$ Now we either convert this into the Hamiltonian or we solve the Euler-Lagrange equations in which case we are left with $$\frac{d}{dt} \frac{\partial L}{\partial \dot{\theta}} = \frac{\partial L}{\partial \theta} \iff m R^2 \ddot{\theta} = m R^2 \cos \theta \sin \theta \dot{\varphi}^2 - \alpha R \sin \theta$$ $$\frac{d}{dt} \frac{\partial L}{\partial \dot{\varphi}} = \frac{\partial L}{\partial \varphi} \iff \frac{d}{dt} \left( m R^2 \sin^2 \theta \dot{\varphi} \right) = 0 \ .$$ From the second equation we see that the quantity $\sin^2 \theta \dot{\varphi}$ is a constant with respect to time. So if we denote this constant by $D$ then we have $$\ddot{\theta} = D \frac{\cos \theta }{\sin^3 \theta} - \frac{\alpha}{m R} \sin \theta \ .$$ Now if we multiply both sides by $\dot{\theta}$ and integrate with respect to time from some initial time $t_0$ we have $$\frac{\dot{\theta}^2}{2} = - \frac{D}{2 \sin^2 \theta} + \frac{\alpha}{m R} \cos \theta + E \ .$$ Here I have included all the constants which appeared in the integration in $E$. Now this problem is the same as the one I have posed.

• i don't think that you can find an explicit solution here – Dr. Sonnhard Graubner Jan 21 '17 at 16:37
• Would you mind posting the original question, just in case to not have XY problem? – Evgeny Jan 21 '17 at 21:31
• I added the original problem. I hope everything is correct! – Kayle of the Creeks Jan 22 '17 at 13:06
• Yeah, I am already looking at this addition :) one comment: usually when we were asked to write equations of motion, we had to write just ODEs that describe the motion. Because, you know, very few problems allow closed form expression that solves ODE. Even qualitative analysis of 2DOF system is sometimes challenging. – Evgeny Jan 22 '17 at 13:23
• FWIW: This mechanical system is known as the spherical pendulum. Angular momentum & energy conservation yield ODE. In standard physics notation: $\quad E=\frac{I}{2}\dot{\theta}^2+ V(\theta)$; $\quad V(\theta):=V_{\rm cf}(\theta)+V_g(\theta)$; $\quad V_{\rm cf}(\theta):=\frac{L_z^2}{2I\sin^2\theta}$; $\quad V_g(\theta):=-mgR\cos\theta$; $\quad I:=mR^2$. – Qmechanic Jan 22 '17 at 13:37