TITLE: If $a^b=c^d$, then $c$ and $a$ are powers of the same number?
QUESTION [5 upvotes]: I want to know in which situations two numbers that can be expressed as powers can be equal. I think it's intuitive that if two powers (say $a^b$ and $c^d$) are equal, then the bases must be themselves powers of a single natural number (say $a=m^k$ and $c=m^l$, so that $m^{kb}=m^{ld}$, and $kb=ld$). But I'm having a hard time proving it.
My approach is as follows: I factor $a$ and $c$ into prime factors and write the equation $a^b=c^d$ as:
$$\left({p_1}^{a_1} {p_2}^{a_2} \cdots {p_n}^{a_n}\right)^b=\left({p_1}^{c_1} {p_2}^{c_2} \cdots {p_n}^{c_n}\right)^d$$
(where $p_1=2$, $p_2=3$, $p_3=5$, etc are the prime numbers) which turns into the following system:
$$a_1 b = c_1 d \\ a_2 b = c_2 d \\ \vdots \\ a_n b = c_n d$$
I want to prove that the vectors $\left[a_1,a_2,\ldots,a_n\right]$ and
$\left[c_1,c_2,\ldots,c_n\right]$ are both integer multiples of some other vector. It's ok to assume that the mdc's of boths lists are $1$, because if, say, $\mathrm{mdc}\left\{a_1,a_2,\ldots,a_n\right\}=k>1$, then we could factor out $k$ from the $a_j$'s and incorporate it into $b$ (this is the same as reducing $a^b$ to $m^{kb}$). Assuming that the mdc's are $1$, I want to prove that the vectors for $a$ and $c$ are equal.
I don't where to go from here. I can do it in the case that the mdc's are pairwise $1$, that is, $\mathrm{mdc}\left\{a_1,a_2\right\}=\mathrm{mdc}\left\{a_1,a_3\right\}=\cdots=\mathrm{mdc}\left\{a_{n-1},a_n\right\}=1$, but not in the general case.

REPLY [6 votes]: Alternatively, we first prove the following claim. To use the claim below, let $k:=\gcd(b,d)$.  From $a^b=c^d$, we have $$a^{\frac{b}k}=c^{\frac{d}k}\,.$$  As $\gcd\left(\dfrac{b}{k},\dfrac{d}{k}\right)=1$, by the claim, there exists $e\in\mathbb{Z}_{>0}$ such that $$a=e^{\frac{d}k}\text{ and }c=e^{\frac{b}k}\,.$$

Claim  Let $x,y,p,q\in\mathbb{Z}_{>0}$ be such that $\gcd(p,q)=1$ and $x^p=y^q$.  Then, there exists $u \in \mathbb{Z}_{>0}$ such that $x=u^q$ and $y=u^p$.

Proof.   As $\gcd(p,q)=1$, there exist $r,s\in\mathbb{Z}$ such that $pr+qs=1$.  Hence, $$x=x^{pr+qs}=x^{pr}x^{qs}=\left(x^p\right)^rx^{qs}=\left(y^q\right)^rx^{qs}=\left(x^sy^r\right)^q\,.$$  Take $u:=x^sy^r$, which is a rational number.  Then, $x=u^q$ and $y=u^p$.  Since $x$ is an integer, $u$ must also be an integer (there are multiple ways to show this, the easiest one I know is that $z=u$ is a rational root of $z^q-x$, and by the Rational Root Theorem, we conclude that $u\in\mathbb{Z}$).