Consider coordinates $(\theta, z)$ on $S^1 \times \mathbb R$, and a vector field $$X = z \dfrac{\partial}{\partial \theta} - \sin \theta \dfrac{\partial}{\partial z}.$$ Show that the integral curve of $X$ through $(\pi/2,0)$ defines a compact submanifold, and find another point s.t. the passing integral curve is not compact.
Hint: calculate $H = \dfrac{z^2}{2}-\cos \theta$ on the integral curves.
1st attempt. By brute force one obtains for an integral curve $\alpha_t = (\alpha^1_t, \alpha^2_t)$ the system $$ \begin{cases} \dot \alpha^1 = \alpha^2\\ \dot \alpha^2 = - \sin \alpha^1 \end{cases}$$ the second equation being not integrable with elementary functions. However maybe one could deduce some properties of the solution?
2nd attempt. A quick calculation shows that $H$ is costant along integral curves. Therefore $z$ is limited on the integral curve, so the curve lies on a limited cilinder. But how do I know that it is compact (and moreover the curve is injective with non null derivative)?
Use the hint: $H= \dfrac{z^2}{2}-\cos \theta$ is constant along the integral curves of $X$. That is, if $\alpha(t)=(\theta(t), z(t))$ is an integral curve of $X$, then the composition $h(t)=H(\alpha(t))$ is a constant function of $t$. To show this, show that $dh/dt=0$, using the chain rule and that $\alpha$ is an an integral curve of $X$, i.e. $\dot\theta=z,\dot z=-\sin\theta.$
It follows that the integral curve through $(a,b)$ is contained in the set defined by $H(\theta,z)=H(a,b)$, i.e. a level set of $H$. Now it is easy to show that all level sets of $H$ are compact, i.e., each is a closed and bounded subset of $S^1\times \mathbb R$.
[It is a good idea at this point to pause and try drawing carefuly the level curves of $H$ in the plane. Then compare your drawing with what you get by searching google images for "phase portrait pendulum". See at the end of my answer for the source of this name.]
The situation is then as follows: all integral curves of $X$, except 3, fill up their corresponding $H$ level set, which is compact. The exception is the level set $H=1$. This level set is filled up by 3 integral curves: the fixed point $(\pi,0)$, and two integral curves, which "begin" and "end" at this fixed point. You can take for example the integral curves through $(0,\pm 2)$. It is quite complicated to write explicit expresion for these integral curves (it involves elliptic functions), but it is not necessary for showing that each of these integral curves fills up the complement of the fixed point in the level set $H=1$.
So to answer yr questions, you need to show: 1. the integral curve through $(\pi/2,0)$ fills up the level set $H=0$, and 2. the integral curves through $(0,\pm 2)$ fill up the complement of $(\pi, 0)$ in the level set $H=1$.
I will let you think about it first. I can help with this also later, if needed.
Note: the use of $H$ in this problem is a trick called "conservation of energy", associated with Newton's famous equation $F=ma$. In our case, you begin with the pendulum equation $\ddot\theta=F(\theta)$, where $F(\theta)=-\sin \theta$. Define $V(\theta)=-\cos\theta$, so that $F=-dV/d\theta$ ($V$ is called the ''potential energy"). Define $T(z)=z^2/2$ (called the "kinetic energy") and let $H=T+V$ (called the "energy"). Then you can check that these definitions imply that for any solution $\theta(t)$ of Newton's $\ddot\theta=F(\theta)$, the composition $h(t)=H(\theta(t), \dot\theta(t))$ is a constant function of $t$. Or more geometricaly, the plane curve $\alpha(t)=(\theta(t), \dot\theta(t))$ is contained in one of the level curves of the function $H(\theta,z)$.
By the way, the letter $H$ comes from Hamilton, a 19th century mathematical physicist, and $H$ is also called the "Hamiltonian". Hamilton noticed that Newton's equation can be rewritten $\dot\theta =\partial H/\partial z, \dot z=-\partial H/\partial \theta$. A good reference is Arnold's book "mathematical methods in classical mechanics".