Solve for integers $x, y$ and $z$:
$x^2 + y^2 = z^3.$
I tried manipulating by adding and subtracting $2xy$ , but it didn't give me any other information, except the fact that $z^3 - 2xy$ and $z^3+2xy$ are perfect squares.
This doesn't give us much information to work on. I don't know if my steps are correct, I do not know how to approach this problem.
Any help would be appreciated.
Let $C$, $D$, $S$ and $T$ be integers, and define \begin{eqnarray*} x&=&ab^3X=(C^2+D^2)(CS^3-3DS^2T-3CST^2+DT^3),\\ y&=&ab^3Y=(C^2+D^2)(DS^3+3CS^2T-3DST^2-CT^3),\\ z&=&ab^2Z=(C^2+D^2)(S^2+T^2). \end{eqnarray*} Then a routine verification shows that $x^2+y^2=z^3$. I will show that every solution is of this form. Moreover, if we require $S$ and $T$ to be coprime and nonnegative, every solution will have precisely one such representation, making this a proper parametrization.
Let $x$, $y$ and $z$ be integers such that $$x^2+y^2=z^3.$$ First note that $x$ and $y$ are not both odd, as otherwise we get a contradiction by reducing mod $8$.
Let $d:=\gcd(x,y)$ and let $a$ and $b$ be integers such that $d=ab^3$ and $a$ is cube-free. Then $d^2=a^2b^6$ divides $z^3$ and hence $a$ divides $z$. Writing $x=au$, $y=av$ and $z=aw$ we see that $$a^3w^3=z^3=x^2+y^2=(ab^3u)^2+(ab^3v)^2=a^2b^6(u^2+v^2),$$ from which it follows that $b^2$ divides $w$ because $a$ is cube-free. So writing $x=ab^3X$, $y=ab^3Y$, $z=ab^2Z$ shows that $$X^2+Y^2=aZ^3,$$ where $X$ and $Y$ are coprime. Factoring in $\Bbb{Z}[i]$ then shows that $$aZ^3=(X+Yi)(X-Yi),$$ where $X$ and $Y$ are coprime and not both odd, so the two factors are coprime. Then $$X+Yi=(A+Bi)(U+Vi)^3,$$ for some integers $A$, $B$, $U$ and $V$ such that $\gcd(A,B)=\gcd(U,V)=1$ and $A^2+B^2=a$ and $U^2+V^2=Z$. Then \begin{eqnarray*} X&=&AU^3-3BU^2V-3AUV^2+BV^3,\\ Y&=&BU^3+3AU^2V-3BUV^2-AV^3, \end{eqnarray*} and hence for $C=bA$ and $D=bB$ we find that \begin{eqnarray*} x&=&ab^3X=(C^2+D^2)(CS^3-3DS^2T-3CST^2+DT^3),\\ y&=&ab^3Y=(C^2+D^2)(DS^3+3CS^2T-3DST^2-CT^3),\\ z&=&ab^2Z=(C^2+D^2)(S^2+T^2). \end{eqnarray*}
In particular, parametrizations given in the other answers and comments correspond to $(C,D,S,T)=$ $$(1,0,a,b),\qquad(k,k,1,0),\qquad(1,k,1,0),\qquad(a,b,1,0).$$