<s>[INST] If $x^3+y^3=72$ and $xy=8$ then find the value of $x-y$. I recently came across a question,

If $x^3+y^3=72$ and $xy=8$ then find the value of $(x-y)$.

By trial and error I found that $x=4$ and $y=2$ satisfies both the conditions. But in general how can I solve it analytically? I tried using $a^3+b^3=(a+b)(a^2+b^2-ab)$ and also $a^3+b^3=(a+b)^3-3ab(a+b)$. But both ways aren't working.
Please explain how do I solve these types of questions analytically. 
 [/INST] You may solve this by brute force. Write $x=8/y$. The first equation now reads
$x^3+\frac{512}{x^3}=72$.
Multiply both sides by $x^3$, and you have
$x^6+512-72x^3=0$. 
Define $u\equiv x^3$, and the equation becomes
$u^2-72u+512=0$.
Use the quadratic formula to solve for $u$, solve back for x, and solve for y.
</s>