I am confused as how to solve an equation with three squared variables to get its integer solutions? As: $$x^2+y^2+z^2=200$$ Thanks!
-
1There are only finitely many cases to check. Trying them yourself you find that $\pm 6, \pm 8, \pm 10$ are solutions. – Hubble Dec 27 '14 at 05:44
3 Answers
All of $x^2$, $y^2$, and $z^2$ must be non-negative, so there are only finitely many cases to check.
- 3,670
-
also either one must be even and two odd, or all three even (6,8,10) – David Holden Dec 27 '14 at 05:25
If you are doing it to find solution to your previous question about the area of that triangle then you should use heron's formula and simplify it in terms of $x, y, z$ like,
$\sqrt{s(s-a)(s-b)(s-c)}=\dfrac{1}{4}\sqrt{(x+y+z)(x+y-z)(x-y+z)(-x+y+z)}$, which will simplify into,
$\dfrac{1}{4}\sqrt{-(x^4+y^4+z^4)+2(x^2y^2+y^2z^2+z^2x^2)}$
Now you can substitute the values to get the required area.
- 2,091
-
Thanks for your reply, my issue was mainly with how to get the values of x, y and z. I knew this could be solved by limiting the value of any variable to a proper interval and some trial-and-error but thought there might be some way to get the solution directly. – John Dec 27 '14 at 05:51
I would do it this way: (it takes just few minutes)
Let's assume $x<=y<=z$, without loss of generality.
$z$ must be larger than $8$, since $3*8^2 = 192 < 200$.
$z$ must be smaller than $15$, since $15^2 = 225 > 200$.
Now, there are six possibilities:
$$x^2+y^2=200-9^2=119$$ $$x^2+y^2=200-10^2=100$$ $$x^2+y^2=200-11^2=79$$ $$x^2+y^2=200-12^2=56$$ $$x^2+y^2=200-13^2=31$$ $$x^2+y^2=200-14^2=4$$
Then, according to the list of Pythagorean triples, only this solution can exist:
$$x=6, y=8, z=10$$
The list above assumes x<>0, and for x=0, we easily get two more solutions:
$$x=0, y=2, z=14$$
and
$$x=0, y=10, z=10$$
Of course, if variables can be negative, there is also a number of solutions directly derived from last three ones.
- 15,966