Suppose $G = \langle x \rangle $ is a cyclic group of order $n\geq 1$. Prove that a subgroup $H \leq G$ is maximal if and only if $H = \langle x^p \rangle$ for some prime $p$ dividing $n$.
Source question: Dummit and Foote, "Abstract algebra", ex 16(c) p.65.
Can someone check my proof?
Attempt:
$\Rightarrow$ Let $H$ be a maximal subgroup of $H$. Write $H = \langle x^s \rangle$ with $s\mid n$. Suppose, to reach a contradiction, that $s$ is not prime. Then we can write $s = qm$ with $1 < q < s$.
Since $x^s = x^{qm} = (x^q)^m$, it follows that $H \subseteq \langle x^q \rangle$. By order considerations, we get strict inclusions
$$\langle x^s \rangle \subset \langle x^q\rangle \subset G$$
and this contradicts the maximality of $H$. Hence, $s$ must be prime.
$\Leftarrow$ Suppose $H = \langle x^p \rangle \subseteq \langle x^s \rangle$ with $p\mid n$. By Lagrange's theorem, we have
$$\frac{n}{p} \mid \frac{n}{(n,s)} \implies (n,s)\mid p$$
and thus $|\langle x^s \rangle| \in \{n/p,n\}$. We conclude that either $\langle x^s \rangle = H$ or $\langle x^s \rangle = G$. Thus, $H$ is maximal.