Suppose that $a$ and $b$ satisfy $a^2b|a^3+b^3$. Prove that $a=b$.

By hypothesis $\ n = \dfrac{a^3\!+b^3}{a^2b} = \dfrac{a}b + \left(\dfrac{b}a\right)^2\! =\, x+x^{-2}\,\overset{\large {\times\, x^2}}\Longrightarrow\,x^3-n\,x^2 + 1 = 0$

By the Rational Root Test $\ a/b\, =\, x\, = \pm 1\ \ $ QED

Generally applying RRT as above yields the degree $\,j+k\,$ homogeneous generalization

$$a,b,c_i\in\Bbb Z,\,\ a^{\large j}b^{\large k}\mid \color{#c00}1\:\! a^{\large j+k}\! + c_1 a^{\large j+k-1} b + \cdots + c_{\large j+k-1} a b^{\large j+k-1}\! + \color{#c00}1\:\!b^{\large j+k}\Rightarrow\, a = \pm b \qquad $$

$\qquad\qquad\ \ \ \ \ \ $ e.g. $\ a^2b \mid a^3 + c_1 a^2b + c_2 ab^2 + b^3\,\Rightarrow\, a = \pm b $

Alternatively the statement is homogeneous in $\,a,b\,$ so we can cancel $\,\gcd(a,b)^{\large j+k}$ to reduce to the case $\,a,b\,$ coprime. The dividend $\,c\,$ has form $\,a^{\large n}\!+b^{\large n}\! + abm\,$ so by Euclid it is coprime to $a,b$ thus $\,a,b\mid c\,\Rightarrow\, a,b = \pm1$.

Remark $\ $ The proof in lhf's answer is precisely the standard proof of the Rational Root Test specialized to this particular polynomial. The Rational Root Test concisely encapsulates all divisibility results of this (homogeneous) form.


Hint: Here, $a,b$ can be negative. It suffices to prove that $|a|=|b|$ when $\gcd(a,b)=1$ and $a^2b\mid a^3+b^3$.


Write $d=\gcd(a,b)$ and $a=dA$, $b=dB$, with $\gcd(A,B)=1$.

Then we can cancel $d^3$ on both sides of $a^2b \mid a^3+b^3$ and get $A^2B \mid A^3+B^3$.

This implies that $A^2 \mid B^3$ and $B \mid A^3$, and so $A=B=1$.

Indeed, $A^2 \mid B^3$ implies that every prime that divides $A$ divides $B$. Since $\gcd(A,B)=1$, we must have $A=1$. But then $B \mid A^3$ implies $B=1$.