Problem: Show that the Diophantine equation
\[ \left( 3x^3+xy^2 \right)\left( x^2y+3y^3 \right) = (x-y)^7 \]
has infinitely many solutions in positive integers,
and characterize all the solutions.

Solution: Let $x=da$, $y=db$, where $\gcd(a,b) = 1$ and $a > b$.
The equation is equivalent to
\[ (a-b)^7 \mid ab\left( a^2+3b^2 \right)\left( 3a^2+b^2 \right)
  \qquad (\star) \]
with the ratio of the two becoming $d$.

\begin{claim*}
  The equation $(\star)$ holds if and only if $a-b=1$.
\end{claim*}
\begin{proof}
  Obviously if $a-b=1$ then $(\star)$ is true.
  Conversely, suppose $(\star)$ holds.
  \begin{itemize}
    \ii If $a$ and $b$ are both odd, then $a^2+3b^2  \equiv 4 \pmod 8$.
    Similarly $3a^2+b^2 \equiv 4 \pmod 8$.
    Hence $2^4$ exactly divides right-hand side, contradiction.
    \ii Now suppose $a-b$ is odd.
    We have $\gcd(a-b,a) = \gcd(a-b,b) = 1$ by Euclid, but also
    \[ \gcd(a-b, a^2+3b^2) = \gcd(a-b, 4b^2) = 1 \]
    and similarly $\gcd(a-b, 3a^2+b^2) = 1$.
    Thus $a-b$ is coprime to each of $a$, $b$,
    $a^2+3b^2$, $3a^2+b^2$ and this forces $a-b = 1$.
  \end{itemize}
\end{proof}
This therefore describes all solutions: namely,
for any $b \ge 1$, if we set $a = b+1$ and $d = ab(a^2+3b^2)(3a^2+b)$
then $(x,y) = (da,db)$ works and any solution is of this form.

\begin{remark*}
  One can give different cosmetic representations of the same solution set.
  For example, we could write $b = \half (n-1)$
  and $a = \half (n+1)$ with $n > 1$ any \emph{odd} integer.
  Then $d = ab(a^2+3b^2)(3a^2+b^2) =
  \frac{(n-1)(n+1)(n^2+n+1)(n^2-n+1)}{4} = \frac{n^6-1}{4}$,
  and hence the solution is
  \[ (x,y) = (da, db) = \left( \frac{(n+1)(n^6-1)}{8},
    \frac{(n-1)(n^6-1)}{8} \right) \]
  which is a little simpler to write.
  The smallest solutions are $(364,182)$, $(11718, 7812)$, \dots.
\end{remark*}