Order of elements is lcm-closed in abelian groups How can I prove that if $G$ is an Abelian group with elements $a$ and $b$ with orders $m$ and $n$, respectively, then $G$ contains an element whose order is the least common multiple of $m$ and $n$?

It's an exercise from Hungerford's book, but it's not homework. I could not solve it when I take the course on groups and I think it should be easy. There is a hint that says to first prove when $m$ and $n$ are coprimes. I did this part. But I have no idea how to solve the general case.

Thanks.
Let $n = \prod_i p_i^{n_i}$ and $m = \prod_i p_i^{m_i}$, where the $p_i$s are the same. Thus $\mathrm{lcm}(n,m) = \prod_i p_i^{\max(n_i,m_i)}$. Let $N = \{ i : n_i \geq m_i \}$ and $M = \{ i : n_i &lt; m_i \}$. Define $n&#39; = \prod_{i \in N} p_i^{n_i}$ and $m&#39; = \prod_{i \in M} p_i^{m_i}$. Now $a&#39; = a^{n/n&#39;}$ is of order $n&#39;$, and $b&#39; = b^{m/m&#39;}$ is of order $m&#39;$. Since $n&#39;,m&#39;$ are coprime, we know that there is an element of order $n&#39;m&#39; = \mathrm{lcm}(n,m)$.



You can also prove it using the structure theorem for abelian groups, but that's an overkill.
Let $G$ be an abelian group. Let $a$ and $b$ belong to $G$ with order $m$ and $n$ respectively.

Three cases arise:

Case 1: If $m\mid n$ or $n\mid m$ then $\mathrm{lcm}(m,n)=m$ or $n$ in the two cases respectively. Hence our condition holds trivially.

Case 2: Suppose $m$ and $n$ are co-primes. Hence $\mathrm{lcm}(m,n) = mn$.
By abelian property of $G$ $(ab)^{mn} = a^{mn}b^{mn} =ee=e$.
If $o(ab)&lt;mn$ then let $k$ be smallest value for which it holds.
Now $a^k$ and $b^k$ must not be $= e$ as if even one of them equals $e$ then $a^k=e$ implies $m\mid k$ as $m$ is the order of $a$.
Also then $b^k=e$ implies $n\mid k$ as $n$ is the order of $b$.
Hence $k$ is a multiple of $m$ and $n$ and is less than $mn$. Contradiction. Hence not possible.
Now if $a^k$ and $b^k$ are not equal to $e$ and $a^kb^k=e$
Then $a^k=(b^k)^{-1}$.
Hence $b^k$ belongs to $\langle a\rangle$.
Hence $o(b^k) \mid o(a)=m$,
but $o(b^k)\mid o(b)=n$,
hence $m$ and $n$ have a common factor.
Contradiction.
Hence $o(ab)=mn$

Case 3:
Let $m$ and $n$ not be coprime.
Let $d= \gcd(m,n)$.
Hence $n/d$ is coprime with $m$,
so $o(a)=m$ and $o(b^d)=n/d$. 
But as $m$ and $n/d$ are coprimes, by Case 2 we get $o(a(b^d))=(mn)/d=mn/\gcd(m,n)=\mathrm{lcm}(m,n)$.
Hence we have an element which has order $\mathrm{lcm}(m,n)$.

Hence proved.