# What are the integer solutions to $z^2-y^2z+x^3=0$?

The question is to describe ALL integer solutions to the equation in the title. Of course, polynomial parametrization of all solutions would be ideal, but answers in many other formats are possible. For example, answer to famous Markoff equation $$x^2+y^2+z^2=3xyz$$ is given by Markoff tree. See also this previous question Solve in integers: $y(x^2+1)=z^2+1$ for some other examples of formats of acceptable answers. In general, just give as nice description of the integer solution set as you can.

If we consider the equation as quadratic in $$z$$ and its solutions are $$z_1,z_2$$, then $$z_1+z_2=y^2$$ while $$z_1z_2=x^3$$, so the question is equivalent to describing all pairs of integers such that their sum is a perfect square while their product is a perfect cube.

An additional motivation is that, together with a similar equation $$xz^2-y^2z+x^2=0$$, this equation is the smallest $$3$$-monomial equation for which I do not know how to describe all integer solutions. Here, the "smallest" is in the sense of question What is the smallest unsolved Diophantine equation?, see also Can you solve the listed smallest open Diophantine equations? .

• one solution is $y=8$ and $x=4$ so that the equation becomes $(z-8)^2=0$ or $z^2-16z+64=0$. I suspect this is the smallest possible solution. Sep 11, 2022 at 22:27
• @user, I think you meant $y=4$. Sep 12, 2022 at 4:23
• $x=y=z=0$ is a "smaller" solution.
– JRN
Sep 12, 2022 at 6:26
• @user, we're talking about $z^2-y^2z+x^3=0$, right? When $y=8$ and $x=4$, this becomes $z^2-64z+64=0$, not $z^2-16z+64=0$, which is what you wrote. But if you take $y=4$, then you do get $z^2-16z+64=0$. OK? Sep 12, 2022 at 10:21
• @GerryMyerson, you are right. I made the mistake of identifying $(z-8)^2$ with $(z-y)^2$ which is not the case. $z=8$ is the solution of the quadratic equation so the value of $y$ and $x$ must be identified after $(z-8)^2$ is expanded to read $(z-8)^2=z^2 -4^2*z +4^3$ which effectively gives the value $y=4$ and also $x=4$. Sep 12, 2022 at 11:12

We get $$z(y^2-z)=x^3$$. Thus $$z=ab^2c^3$$, $$y^2-z=ba^2d^3$$ for certain integers $$a, b, c, d$$ (that is easy to see considering the prime factorization). So $$ab(bc^3+ad^3)=y^2$$. Denote $$a=TA$$, $$b=TB$$ (each pair $$(a, b)$$ corresponds to at least one triple $$(A, B, T)$$, but possibly to several triples). You get $$T^3AB(Bc^3+Ad^3)=y^2$$.Thus $$T$$ divides $$y$$, say $$y=TY$$. We get $$Y^2=TAB(Bc^3+Ad^3)$$.

So, all solutions are obtained as follows: start with arbitrary $$A, B, c, d$$ and choose any $$Y$$ which square is divisible by $$AB(Bc^3+Ad^3)$$, the ratio is denoted by $$T$$ (if both $$Y$$ and $$AB(Bc^3+Ad^3)$$ are equal to 0, take arbitrary $$T$$).

• Thank you. In my opinion, this is a good description of all integer solutions, so I will accept this answer. Sep 12, 2022 at 15:20
• Can this method also solve $xz^2-y^2z+x^2=0$, the second equation mentioned in the question? Sep 12, 2022 at 15:55
• Ah, yes, now I see that it works for this equation as well, thanks again. Sep 12, 2022 at 16:49

Since the equation is NOT homogeneous, it is trivial to find infinite families of solutions with $$g=\gcd(x,y)>1$$. For instance, choose any integers $$a$$ and $$b$$, set $$c=ab^2-a^2$$, so multiplying by $$c^8$$ gives $$(ac^4)^2-ac^4(bc^2)^2+c^9=0$$, giving the trivial solutions $$(x,y,z)=(c^3,bc^2,ac^4)$$, but there are many other ways to find trivial'' solutions.

If you assume $$g=\gcd(x,y)=1$$, the solution is pretty standard: since we have a monic second degree equation in $$z$$, there exist integer solutions if and only if the discriminant is a square, giving the auxiliary equation $$y^4-4x^3=d^2$$, rewritten as $$((y^2-d)/2)((y^2+d)/2)=x^3$$, and since the factors are coprime, they are both cubes, say $$a^3$$ and $$b^3$$, so $$x=ab$$, $$y^2=a^3+b^3$$, hence $$z=b^3$$. The equation in $$y$$ is a standard superFermat equation of elliptic type, which is entirely parametrized by the following three parametrizations (see for instance my GTM 240 chapter 14 for a proof), where $$s$$ and $$t$$ are coprime integers, and any solution belongs to one and only one parametrization: $$(a,b,y)=(s(s+2t)(s^2-2ts+4t^2),-4t(s-t)(s^2+ts+t^2),\pm(s^2-2ts-2t^2))$$ with $$s$$ odd and $$s\not\equiv t\pmod3$$, $$(a,b,y)=(s^4-4ts^3-6t^2s^2-4t^3s+t^4,2(s^4+2ts^3+2t^3s+t^4),3(s^2-t^2)(s^4+2s^3t+\ 6s^2t^2+2st^3+t^4))$$ with $$s\not\equiv t\pmod{2}$$ and $$s\not\equiv t\pmod 3$$, $$(a,b,y)=(-3s^4+6t^2s^2+t^4,3s^4+6t^2s^2-t^4,6st(3s^4+t^4))$$ with $$s\not\equiv t\pmod{2}$$ and $$3\nmid t$$.

• Thank you! The question is to describe ALL solutions, including all "trivial" ones, but I am happy to also have a parametrized description of coprime solutions. Sep 12, 2022 at 15:19

Here is an infinite family of solutions resulting from setting $$x=A z$$ for integer $$A$$.

For example set $$x=2z$$ and get

$$g(y,z)=-(y^2 - 8*z^2 - z)*z$$

The quadratic factor is conic and Wolfram Alpha gives infinitely many integer solutions in terms of powers of square root of two, e.g: $$f(2*36,102,36)=0$$

Potential attack might be to try rational $$A$$ and then find integral points on a conic with rational coefficients.

There exists parametrization of the rational solutions since your equation is a rational surface:

$$X1=-1/2*s^2*t/(2*t^3 - s),Y1=-1/2*s^2/(2*t^3 - s),Z1=1/2*s^3*t^3/(4*t^6 - 4*s*t^3 + s^2)$$

• Why is this disliked? Sep 12, 2022 at 7:23

We already have a description of all solutions by @FedorPetrov, and co-prime solutions by @HenriCohen, and some promises for some special solutions.

Let me present a very simple and explicite family of special solutions parametrized by natural variables $$\ t\$$ and $$\ n.$$

Let

$$z_k\ :=\ (t^2-1)^{6\cdot n-k}$$ for $$\ k=1\$$ or $$\ 2.\$$ Then:

$$z_1+z_2\ =\ \left((t^2-1)^{3\cdot n-1}\cdot t\right)^2$$ and $$z_1\cdot z_2\ =\ \left(t^2-1)^{4\cdot n-1}\right)^3$$

is an explicite (while very special) family.

PS:

$$2^3+1\ =\ 3^2$$ $$2^3\cdot 1\ =\ 2^3$$

PPS:

If $$\,\ z_1\$$ and $$\ z_2\,\$$ form a solution then so do $$\,\ w_1:= a^6\cdot z_1\$$ and $$\ w_2\ := a^6\cdot z_2.$$

Thus, above, we could have:

$$w_1\ :=\ a^6\cdot(t^2-1)^5$$ $$w_2\ :=\ a^6\cdot(t^2-1)^4$$

Let $$z := y^2$$. Then, $$x$$ must be equal to zero, while $$y$$, by construction, is free to run over the integers.