# 2015 USAJMO Problems/Problem 2

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

### Problem

Solve in integers the equation $$x^2+xy+y^2 = \left(\frac{x+y}{3}+1\right)^3.$$

### Solution

We first notice that both sides must be integers, so $\frac{x+y}{3}$ must be an integer.

We can therefore perform the substitution $x+y = 3t$ where $t$ is an integer.

Then: \begin{align*} (3t)^2 - xy &= (t+1)^3 \\ 9t^2 + x (x - 3t) &= t^3 + 3t^2 + 3t + 1 \\ 4x^2 - 12xt + 9t^2 &= 4t^3 - 15t^2 + 12t + 4 \\ (2x - 3t)^2 &= (t - 2)^2(4t + 1) \end{align*} $4t+1$ is therefore the square of an odd integer and can be replaced with $(2n+1)^2 = 4n^2 + 4n +1$.

By substituting using $t = n^2 + n$ we get: \begin{align*} (2x - 3n^2 - 3n)^2 &= [(n^2 + n - 2)(2n+1)]^2 \\ 2x - 3n^2 - 3n &= \pm (2n^3 + 3n^2 -3n -2) \\ x = n^3 + 3n^2 - 1 &\text{ or } x = - n^3 + 3n + 1 \end{align*}

Using substitution we get the solutions: $(n^3 + 3n^2 - 1, - n^3 + 3n + 1) \cup ( - n^3 + 3n + 1, n^3 + 3n^2 - 1)$