It's an exercises of the text book Elementary Number Theory and It's Applications 6th Edition by Kenneth H.Rosen. I wanted to solve it using the method in solving the diophantine equation $x^2+y^2=z^2$. But some difficult gaps showed up. And I found that the rational solutions of $w^2+x^2+y^2=1$ is $$w = \frac{2s}{1+s^2+t^2}$$ $$x = \frac{2t}{1+s^2+t^2}$$ $$y = \frac{1-s^2 - t^2}{1+s^2+t^2}$$ where $s$ and $t$ are both rational numbers. From this I found out that $$(2mnq^2)^2 + (2pqn^2)^2 + (n^2q^2 - m^2q^2-n^2p^2)^2 = (n^2q^2 + m^2q^2+n^2p^2)^2.$$ But it helps little because I cannot prove that the solutions have to be in such form.

Can any one help?


migrated from mathoverflow.net Nov 27 '14 at 9:26

This question came from our site for professional mathematicians.

  • $\begingroup$ Hint: sthereographic projection. So said, I'm voting to close since this is not a research-level question. $\endgroup$ – Francesco Polizzi Nov 27 '14 at 9:26

In General it is possible in various ways to write the solution to this equation:


I like such kind.





If you want you can write infinitely many formulas are not the problem. You can even choose a particular form. It is of interest how to solve equations such as this:


$a,b,c,d,j,r,w - $ any specified coefficients.

  • $\begingroup$ Thanks. Is that any textbook about Diophantine Equations recommended? I found the solution of my question in An Introduction to Diophantine Equations, while it's not the same kind as you said $\endgroup$ – Risto Nov 27 '14 at 10:16
  • $\begingroup$ @Risto I don't use textbooks. There everything is difficult and not effective. There are more efficient methods of calculation. Only they cannot be used. $\endgroup$ – individ Nov 27 '14 at 10:30

Aspects of your question have been covered here about Lebesgue's Identity,

lebesgue's identity

and a general approach to $x_1^2+x_2^2+\dots+x_n^2 = z^2$,

Diophatine equation $x^2+y^2+z^2=t^2$

  • $\begingroup$ Great! Can and at the same time tell me how to solve this equation? $ax^2+bxy+cxz+dy^2+jyz+rz^2=tq^2$ How to write for this equation the formula? $\endgroup$ – individ Nov 27 '14 at 15:24
  • $\begingroup$ @individ Post it as a question in the forum, and I'll answer. $\endgroup$ – Tito Piezas III Nov 27 '14 at 18:38
  • $\begingroup$ I was blocked and the questions to ask can't. It is not necessary to write the formula using the known solution of the equation. It is necessary that in the formula substitute the coefficients and get an answer. I have got this. artofproblemsolving.com/blog/98937 It will be interesting to see a different formula. $\endgroup$ – individ Nov 28 '14 at 4:36

Here I have a solution just using Pythagorean triples. we know that any solution of $$x^2+y^2=z^2$$ can be written as $$x=2ab,\,\,\,\,\, y=a^2-b^2,\,\,\,\,\ z=a^2+b^2.$$ Therefore for your equation, we can choose $$w=4abc,\,\,\,\,\, x=2(a^2-b^2)c,\,\,\,\,\ y=(a^2+b^2)^2-c^2,\,\,\,\,\,z=(a^2+b^2)^2+c^2.$$

Isn't it interesting? :)

  • $\begingroup$ Also, if we wont we can generalize this argument for arbitrary number of variables. $\endgroup$ – Bumblebee Nov 28 '14 at 13:00
  • $\begingroup$ But in fact i want all solutions of this diophantine equation, and your answer (including the other answers) just gives me that some solutions of it. I found a theorem in An Introduction to Diophantine Equations, stated as follow. All solutions to equation $x^2+y^2+z^2 = t^2$ in positive integers $x,y,z,t$ with $y,z$ even are given by $$x = \frac{l^2+m^2-n^2}{n}, y = 2l, z = 2m, t = \frac{l^2+m^2+n^2}{n},$$ where $l,m$ are arbitrary positive integers and $n$ is any divisor of $l^2+m^2$ less than $\sqrt{l^2+m^2}$. Every solution is obtained exactly once in this way. $\endgroup$ – Risto Dec 2 '14 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.