What is the non-zero integer general solution to $x^3+y^2=z^2$ ? I guess it is already solved in some book or paper, in that case plz help me to find that.
Edit:
One solution is - $n^3 = [(n)(n+1)/2]^2 - [(n)(n-1)/2]^2$ Found in here.
$(x,y,z)=\left(abuv,\frac{ab(bu^3-av^3)}{2},\frac{ab(bu^3+av^3)}{2}\right)$ where $bu^3\equiv av^3\pmod{2}$
We have: $x^3+y^2 = z^2 \Longrightarrow x^3 = z^2-y^2$.
We are looking for non-trivial integer solutions. So, let's assume $x>0,y>0,z>0$. Thus, $z>y>0$. Let's write $z = y+n$.
This gives:
$$x^3 = (y+n)^2 - y^2 = 2ny + n^2$$
So, $x^3 \equiv n^2 \pmod{2n}$ implies there exists a solution in this form. Let's try it out:
$$n=1: x^3 = (y+1)^2-y^2 = 2y+1 \Longrightarrow x^3\equiv 1 \pmod{2}\text{ and }y = \dfrac{x^3-1}{2}$$
Examples:
$$3^3 = \left(\dfrac{3^3-1}{2}+1\right)^2 - \left(\dfrac{3^3-1}{2}\right)^2 = 14^2-13^2 \\ 5^3 = \left(\dfrac{5^3-1}{2}+1\right)^2 - \left(\dfrac{5^3-1}{2}\right)^2 = 63^2-62^2 \\ \vdots$$
$$n=2: x^3 = (y+2)^2-y^2 = 4y+4 \Longrightarrow x^3\equiv 0 \pmod{4} \text{ and }y = \dfrac{x^3-4}{4}$$
Examples:
$$4^3 = \left(\dfrac{4^3-4}{4}+2\right)^2 - \left(\dfrac{4^3-4}{4}\right)^2 = 17^2-15^2 \\ 8^3 = \left(\dfrac{8^3-4}{4}+2\right)^2 - \left(\dfrac{8^3-4}{4}\right)^2 = 129^2-127^2 \\ \vdots$$
$$n=3: x^3 = (y+3)^2-y^2 = 6y+9 \Longrightarrow x^3 \equiv 3 \pmod{6} \text{ and }y = \dfrac{x^3-9}{6}$$
Examples:
$$3^3 = \left(\dfrac{3^3-9}{6}+3\right)^2-\left(\dfrac{3^3-9}{6}\right)^2 = 6^2-3^2 \\ 9^3 = \left(\dfrac{9^3-9}{6}+3\right)^2-\left(\dfrac{9^3-9}{6}\right)^2 = 123^2-120^2 \\ \vdots$$
Note: $(2n)^2 \equiv 0 \pmod{4n}$ and $(2n-1)^2 \equiv n \pmod{2(2n-1)}$ for all positive integers $n$. This yields:
$$\begin{array}{c|c}n & \text{equivalence} \\ \hline 1 & x^3 \equiv 1\pmod{2} \\ 2 & x^3 \equiv 0\pmod{4} \\ 3 & x^3\equiv 3 \pmod{6} \\ 4 & x^3\equiv 0\pmod{8} \\ 5 & x^3\equiv 5 \pmod{10} \\ 6 & x^3\equiv 0 \pmod{12} \\ 7 & x^3\equiv 7 \pmod{14} \\ 8 & x^3\equiv 0 \pmod{16} \\ 9 & x^3\equiv 9 \pmod{18} \\ \vdots & \vdots\end{array}$$