Solve the diophantine $x^3-ax=by$ If $\gcd(x,y)=1$.
Any hint? My first impression is $\gcd(x,b)>1$ and $x^2=ky+a$ for some integer $m$. I conclude that as long as there exists a square integer $u$ such that $ky+a=u^2$, we get proper solutions each and every time. Is my approach correct? because I was thinking that at least one of the solutions $x$ must have a common prime factor with $y$ Since the constant term is a multiple of $y$.Please help.
Hint:
Since $\gcd(x,y)=1$ therefore there exists $m_0,n_0 \in \mathbb{Z}$ such that $$m_0x+n_0y=1.$$ In fact for any $r \in \mathbb{Z}$ we can say that $$(m_0-ry)x+(n_0+rx)y=1,$$ and these are the totality of solutions.
From this we get $$[(m_0-ry)x^3]x+[(n_0+rx)x^3]y=x^3.$$ This can be rewritten as $$x^3-\color{red}{[(m_0-ry)x^3]}x=\color{red}{[(n_0+rx)x^3]}y.$$