TITLE: When is the sum of two squares the sum of two cubes
QUESTION [6 upvotes]: When does $a^2+b^2 = c^3 +d^3$ for all integer values $(a, b, c, d) \ge 0$. I believe this only happens when: $a^2 = c^3 = e^6$ and $b^2 = d^3 = f^6$. With the following exception:

$1^3+2^3 = 3^2 + 0^2$

Would that statement be correct?
Is there a general formula for when this happens?

REPLY [5 votes]: Equation:
$$x^2+y^2=z^3+u^3$$
Formula of the solution, you can write:
$$x=q^6-2(a+s+t)q^5+(t^2-2(4a+3s)t-3a^2-10as-s^2)q^4-$$
$$-4(3t^3+(5a+4s)t^2+(3a^2+2as+s^2)t+a(a^2-s^2))q^3+$$
$$+(7t^4+4(a+s)t^3+6(3a^2+2as+s^2)t^2+4(3a^3+9sa^2+3as^2-s^3)t+3a^4+12sa^3+$$
$$+18s^2a^2-4as^3-s^4)q^2-(t^2-2ts+a^2-2as-s^2)(10t^3+18(a+s)t^2+$$
$$+2(5a^2+8as+5s^2)t+2(a^3+sa^2+as^2+s^3))q+(t^2-2at-a^2-2as+s^2)(7t^4+$$
$$+10(a+s)t^3+8(a^2+as+s^2)t^2+2(a^3+sa^2+as^2+s^3)t+a^4+2a^2s^2+s^4)$$
$$..............................................................$$
$$y=q^6+2(a+s+t)q^5+(t^2-2(3a+4s)t-a^2-10as-3s^2)q^4+$$
$$+4(3t^3+(4a+5s)t^2+(a^2+2as+3s^2)t+s(s^2-a^2))q^3+$$
$$+(7t^4+4(a+s)t^3+6(a^2+2as+3s^2)t^2+4(-a^3+3sa^2+9as^2+3s^3)t-a^4-4sa^3+$$
$$+18a^2s^2+12as^3+3s^4)q^2+(t^2-2at-a^2-2as+s^2)(10t^3+18(a+s)t^2+$$
$$+2(5a^2+8as+5s^2)t+2(a^3+sa^2+as^2+s^3))q+(t^2-2ts+a^2-2as-s^2)(7t^4+$$
$$+10(a+s)t^3+8(a^2+as+s^2)t^2+2(a^3+sa^2+as^2+s^3)t+a^4+2a^2s^2+s^4)$$
$$.............................................................$$
$$z=q^4-2(t^2+a^2+s^2+4at+4as+4st)q^2-3t^4-8(a+s)t^3-$$
$$-2(a^2+4as+s^2)t^2+a^4+2a^2s^2+s^4$$
$$..............................................................$$
$$u=(q^2+t^2+a^2+s^2)(q^2+5t^2+4(a+s)t+a^2+s^2)$$
$q,a,s,t$ - integers of any sign.
After substitution and obtain numerical results. It should be divided into common divisor. To get a primitive solution.