# Hamilton's equations for a simple pendulum

I don't get how to use Hamilton's equations in mechanics, for example let's take the simple pendulum with $$H=\frac{p^2}{2mR^2}+mgR(1-\cos\theta)$$ Now Hamilton's equations will be: $$\dot p=-mgR\sin\theta$$ $$\dot\theta=\frac{p}{mR^2}$$ I know one of the points of Hamiltonian formalism is to get first order diff. equations instead of second order that Lagrangian formalism gives you, but how can I proceed from here without just derivating again wrt. $\dot\theta$ and substituting $\dot p$ to get the same equation that I get with the Lagrangian formulation? Or is that the way to do it? And how could I get the path of the system on the phase space with those equations?

-

## 1 Answer

Generally both formulations (Largangian and Hamiltonian) are equivalent, but in your case, if $\theta$ is small, you have a simplified equation for $p$ and you can use a solution ansatz like $e^{i\omega t}$ for both $p$ and $\theta$.

To draw a path in the phase space, you have to solve the equations and/or manage to express $p(\theta)$ or $\theta(p)$.

-
Thanks for the info, so I will get to the same second order differential equation? And about the phase space? – MyUserIsThis Jan 22 at 16:41
Not obligatory, you can solve $\dot{p}\propto \theta$ and $\dot{\theta}\propto p$ by the ansatz. – Vladimir Kalitvianski Jan 22 at 16:48

2
To add to what Vladimir said, if you consider a system with $n$ generalized coordinates (in this case $n=1$ since your system is described by the coordinate $\theta$), then you will obtain $2n$ first order differential equations, $n$ for the coordinates and $n$ for their corresponding canonical momenta. To get the path in phase space, you can do what Vladimir suggests; this will allow you to obtain $\theta(t)$ and $p(t)$, and then you simply plot these functions as a parametric curve on the $\theta$-$p$ plane. Cheers! – joshphysics Jan 22 at 16:52
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 3, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9172859787940979, "perplexity_flag": "head"}