Squares and Squares of Integers

Consider the equation x 2 + y 2 = 3 z 2 . x^2+y^2=3z^2. Are there any other integer solutions besides the solution where x = y = z = 0 ? x=y=z=0?

Yes, infinitely many Yes, finitely many No

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

15 solutions

Nick Turtle
Dec 29, 2017

Relevant wiki: Quadratic Diophantine Equations - Fermat's Method of Infinite Descent

Proof by contradiction

Take the positive integer solution tuple x , y , z x,y,z such that z z is the smallest possible.

Because 1 2 2 2 1 ( mod 3 ) 1^2\equiv2^2\equiv1\ (\text{mod }3) and the right-hand side of the equation is divisible by 3 3 , it must be the case that both x x and y y are divisible by 3 3 .

So x = 3 a x=3a and y = 3 b y=3b for some positive integers a a and b b .

Then, 9 a 2 + 9 b 2 = 3 z 2 9a^2+9b^2=3z^2 , or 3 a 2 + 3 b 2 = z 2 3a^2+3b^2=z^2 . This means that z z is also divisible by 3 3 . So z = 3 c z=3c for some integer c c .

This means that 9 a 2 + 9 b 2 = 27 c 2 9a^2+9b^2=27c^2 .

Divide both sides by 9 9 to get a 2 + b 2 = 3 c 2 a^2+b^2=3c^2 . Since a < x , b < y , c < z a<x,b<y,c<z , this means that there is a smaller positive integer solution than x , y , z x,y,z , contradicting our original assumption.

This proves that there is no smallest positive integer solution, or no positive integer solution at all. The argument works similarly for negative numbers. In other words, since it is impossible for exactly one or two of the variables to be 0 0 , x = y = z = 0 x=y=z=0 is the only possible integer solution.

Note: For clarity, you need to define what a "smallest" solution is. IE how do you compare the tuples of ( 1 , 2 , 6 ) (1, 2, 6) and ( 3 , 4 , 5 ) (3, 4, 5) ?

Usually, what people would do is "Take the solution with the smallest z z ".

Calvin Lin Staff - 3 years, 5 months ago

Log in to reply

Ok, I edited it so that it now reads the smallest z z possible.

Nick Turtle - 3 years, 5 months ago

How did you deduce that z is a multiple of 3 ? I'm not able to understand that part.

Divyanshu Bansal - 3 years, 5 months ago

Log in to reply

Since x 2 + y 2 = 3 z 2 x^2+y^2=3z^2 , x 2 + y 2 x^2+y^2 is divisible by 3 3 . If you substitute all possible combinations of x = 3 a , 3 a + 1 , 3 a + 2 x=3a,3a+1,3a+2 and y = 3 b , 3 b + 1 , 3 b + 2 y=3b,3b+1,3b+2 (or using modular arithmetic, which is significantly easier), you will find that only x = 3 a , y = 3 b x=3a,y=3b works. All other combinations results in x 2 + y 2 x^2+y^2 not divisible by 3 3 .

So, substitute x = 3 a , y = 3 b x=3a,y=3b to get ( 3 a ) 2 + ( 3 b ) 2 = 3 z 2 {(3a)}^2+{(3b)}^2=3z^2 , or 9 a 2 + 9 b 2 = 3 z 2 9a^2+9b^2=3z^2 . Divide both sides by 3 3 to get 3 k 2 + 3 m 2 = z 2 3k^2+3m^2=z^2 . The left-hand side is divisible by 3 3 , and z 2 z^2 is divisible by 3 3 if and only if z z is divisible by 3 3 . Therefore, z z is divisible by 3 3 .

Hope this helps.

Nick Turtle - 3 years, 5 months ago

Log in to reply

Got it!! Thanks for the reply. :-) :-)

Divyanshu Bansal - 3 years, 5 months ago

Shorter: The left hand side is a multiple of 9. If z is not a multiple of 3, the right hand side is not a multiple of 9.

Richard Desper - 3 years, 5 months ago
Chan Tin Ping
Dec 29, 2017

Relevant wiki: Fermat's Method of Infinite Descent

Consider the remainder of x 2 , y 2 x^2, y^2 when divided by 3 3 , it can be only 0 0 or 1 1 . Note that x 2 + y 2 x^2+y^2 is a multiple of 3 3 . If either one of remainder when x 2 x^2 or y 2 y^2 is divided by 3 3 is equal to 1 1 , then the other remainder should be 2 2 , which is impossible. Hence, we can conclude that x 2 x^2 and y 2 y^2 are multiple of 3 3 , which is also x x and y y .

Let x = 3 a , y = 3 b x=3a, y=3b . We can get x 2 + y 2 = 3 z 2 9 a 2 + 9 b 2 = 3 z 2 3 a 2 + 3 b 2 = z 2 3 ( a 2 + b 2 ) = z 2 \begin{aligned} x^2+y^2&=3z^2 \\ 9a^2+9b^2&=3z^2 \\ 3a^2+3b^2&=z^2 \\ 3(a^2+b^2)&=z^2 \end{aligned} Obviously, z z is multiple of 3 3 . Let z = 3 c z=3c . 3 a 2 + 3 b 2 = 9 c 2 a 2 + b 2 = 3 c 2 \begin{aligned} 3a^2+3b^2&=9c^2 \\ a^2+b^2=3c^2 \end{aligned} Now, we get another equation with same style but different numbers. Obviously, a , b , c a,b,c are smaller than x , y , z x,y,z respectively.

Let there exist another non-trivial solution ( x 0 , y 0 , z 0 x_0,y_0,z_0 ) then we can get another s m a l l e r smaller non-trivial solution ( a 0 , b 0 , c 0 a_0,b_0,c_0 ). And we can get another smaller non-trivial solution again infinitely. However, this is obviously non logical, because there exist finite number which are smaller than x 0 x_0 . Hence, by contradiction, there is n o \large no non-trivial solution.

How did you deduce that z is a multiple of 3 ? I'm not able to understand that part.

Divyanshu Bansal - 3 years, 5 months ago

Log in to reply

I already add 1 more line to show it, can you understand now?

Chan Tin Ping - 3 years, 5 months ago

Log in to reply

Actually I missed the part that z^2 can be divisible by 3 iff z is divisible by 3. Thanks btw. :-)

Divyanshu Bansal - 3 years, 5 months ago

It is a well-known fact that the sum of two coprime perfect squares is the product of 2 and/or prime numbers of the form 4 n + 1 4n+1 . It can therefore not be divisible by 3.

Actually the sum of two perfect squares can be divisible by 3, and in general by any prime of the form 4n+3 as long as the exponent of these primes in the factorization is even. So the thing here is that the exponent of 3 in the right side can't be an even number, and therefore the right side can't be the sum of two perfect squares.

Francesco Iudica - 3 years, 5 months ago

Log in to reply

That is why I included the word coprime in my solution. If x , y x, y are not coprime, divide out their common factor to reduce the situation.

Arjen Vreugdenhil - 3 years, 5 months ago

Log in to reply

Got it. Could you hand me a proof of this?

Francesco Iudica - 3 years, 5 months ago

Log in to reply

@Francesco Iudica Here you go .

Pi Han Goh - 3 years, 4 months ago
Jitarani Nayak
Jan 1, 2018

This one is also through fermat's method of infinite descent (with a twist).
Instead of modulo 3 go modulo 4.
The set of quadratic residues modulo 4 is {0,1} The only permissible case for x,y,z is x ² , y ² , z ² 0 ( m o d 4 ) x²,y²,z² \equiv 0\pmod 4 .
If they leave any of the remainder the equation is not satisfied. So, x , y , z 0 ( m o d 2 ) x,y,z \equiv 0\pmod 2 .
L e t x = 2 a , y = 2 b , z = 2 c Let x=2a, y=2b, z=2c .
Substituting and simplifying we get,.
a ² + b ² = 3 c ² a²+b²=3c² .
Now I think you know how to apply fermats method of infinite descent and show that the given equation has no positive integer solutions.
Again as the terms are squares, so as there are no positive integer solutions therefore there are no integer(non-trivial) solutions.




Great idea to look at mod 4. But a couple of the 4's should be 2's.

x^2 = 0 mod 4 implies that x = 0 mod 2. All three variables must be even, but not necessarily multiples of four.

Matthew Feig - 3 years, 5 months ago

Yay! What I did!

Sharky Kesa - 3 years, 5 months ago

I think it wrong as If you consider the equation x^2 + y^2 =3 z^2
as a equation of circle (x^2 + y^2 = c){with center at origin} then c = 3
z^2 and thus for any value of z ; x & y can have finitely many values but z may have infinitely many values thus x&y will also take infinitely many values ! Thus answer should be Infinitely many solution !~!

Antariksha Mitra - 3 years, 5 months ago

Log in to reply

Note that we want integer solutions, not real solutions.

Sharky Kesa - 3 years, 5 months ago
Lumbis Horsemin
Jan 9, 2018

The prime decomposition of 3 z 2 3z^2 will necessarily contain 3 raised to an odd power, when z 0 z \neq 0 . Therefore, by the sum of two squares theorem , 3 z 2 3z^2 cannot be expressed as a sum of integer squares, when z 0 z \neq 0 .

Robert DeLisle
Jan 11, 2018

I do not expect any upvotes for this, totally lacking in style.

The right hand side is divisible by 3 and must have an odd number of factors of 3 (3 plus an even number of 3's from z squared).

First, if 3 divides x, it must also divide y otherwise the left hand side will not be divisible by 3. If both x and y are divisible by 3, the sum of their squares will have an even number of factors of 3 and thus cannot equal the product of an odd number of factors on the right hand side.

Second, the squares of all numbers not divisible by 3 have remainder 1 when divided by 3. Thus, if neither x nor y is divisible by 3, the left had side will have remainder 2, while the right hand side is divisible by 3 with no remainder.

That is how I solved it.

If ( a , b , c ) (a,b,c) is a primitive Pythagorean triplet then exactly one of a , b a,b is divisible by 3. The given equation implies both a , b a,b is divisible by 3. A contradiction if they are non-zero.

If ( a , b , c ) (a,b,c) is a primitive Pythagorean triplet then exactly one of a , b a,b is divisible by 3.

Hmmm, this doesn't look obvious to me. Can you show us why this is true?

Pi Han Goh - 3 years, 5 months ago

Log in to reply

Okay. Any square is either 0 or 1 mod 3. Both cannot be 1 mod 3. So one of them is 0 mod 3. Since it is primitive, hence both cannot be 0 mod 3.

Aritra Bhattacharya - 3 years, 4 months ago

Log in to reply

Nicely done! Thanks.

Pi Han Goh - 3 years, 4 months ago
Massimo 22
Jan 8, 2018

x 2 + y 2 = 3 z 2 x^2 +y^2 = 3z^2

x + y = ( 3 ) z x + y = \sqrt(3) z

Now we know that x + y divided by the square root of three is z. This means that of x and y are integers. Z is always irrational and visa versa because a divided by b where b is irrational and a is rational is an irrational number

You can't take a square root like that

Moaz Selim - 3 years, 5 months ago

sqrt(a^2+b^2) != a+b except when one is equal to zero.

Mike Pannekoek - 3 years, 5 months ago

Your reasoning is wrong. x 2 + y 2 = x + y \sqrt{x^2 + y^2} = x + y is not always true. Take x = 3 , y = 4 x=3, y=4 as an example.

Pi Han Goh - 3 years, 5 months ago
Tom Engelsman
Feb 8, 2021

Deploying primitive Pythagorean triplets here ( p , q N , p > q ) p,q \in \mathbb{N}, p > q) yields:

x = p 2 q 2 x = p^2 - q^2

y = 2 p q y = 2pq

3 z = p 2 + q 2 \sqrt{3} z= p^2 + q^2

If z = p 2 + q 2 3 , z = \frac{p^2+q^2}{\sqrt{3}}, then z z is purely irrational z Z . \Rightarrow z \notin \mathbb{Z}. Hence, no other integral triplet than x = y = z = 0 x=y=z=0 satisfies x 2 + y 2 = 3 z 2 . x^2 + y^2 = 3z^2.

Juan Cruz Roldán
Oct 29, 2020

Note that x 2 + y 2 0 ( m o d 3 ) x^2 + y^2 \equiv 0 \ (mod \ 3) . But then by Fermat's little theorem we have 1 + 1 0 ( m o d 3 ) 1+1 \equiv 0 \ (mod \ 3) which is a contradiction and leads us to the conclusion that there are no more integer solutions.

Ribal Slim
Jan 14, 2018

You have that x=y=z so u can all replace them by one variable and there you go.

x^2+x^2=3x^2

2x^2 /x^2 =3

2=3 impossible

If you subtract, it will lead you to the old statment that x=y=z=0

Prince Singh
Jan 14, 2018

You can think it logically also. A equation in 2 variable generally have infinitely many solutions but as you see it is in 3 variables.

Xiu Li
Jan 13, 2018

The key is x 2 1 or 0 ( mod 3 ) x^2 \equiv1\ \text{or}\ 0 (\text{mod}\ 3)

David Robert
Jan 9, 2018

Here's a different way to do it:

The equation defines a surface in R 3 \mathbb{R}3 . Express that surface in cylindrical coordinates: ( r s i n ( θ ) ) 2 + ( r c o s ( θ ) ) 2 = 3 z 2 = r 2 (r sin(\theta))^2 + (r cos(\theta))^2 = 3 z^2 = r^2

Take the square root: r = 3 z r = \sqrt{3} z

Since 3 \sqrt{3} is irrational, r z \frac{r}{z} cannot equal 3 \sqrt{3} for integer values of r and z.

I don't think r r has to be an integer. Else this proof would imply that x 2 + y 2 = 5 z 2 x^2+y^2=5z^2 has no integer solutions, when in fact 1 2 + 2 2 = 5 1 2 1^2+2^2=5\cdot1^2 is one.

Nick Turtle - 3 years, 5 months ago

I followed an entirely different part, so I wanted to check this with you guys (and try LaTeX for the first time :) ).

We start from x 2 + y 2 = 3 z 2 x^2 + y^2 = 3z^2
Assume that y x y \geq x , so y = k x y = k \cdot x , with k 1 , k R k \geq 1, k \in \mathbb{R} . If y < x y < x , switch them.

Then x 2 + y 2 = x 2 + k 2 x 2 = x 2 ( k 2 + 1 ) = 3 z 2 x^2 + y^2 = x^2 + k^2 \cdot x ^2 = x^2 \cdot (k^2 + 1) = 3 \cdot z^2
Therefore, z 2 = x 2 k 2 + 1 3 z^2 = x^2 \cdot \frac {k^2 + 1}{3}

Note by definition z x z \geq x , and z y z \geq y , so z k x z \geq k \cdot x
Then z 2 = x 2 k 2 + 1 3 x 2 k 2 z^2 = x^2 \cdot \frac {k^2 + 1}{3} \geq x^2 \cdot k^2

This means either x = 0 x = 0 (and y = 0 , z = 0 y = 0, z = 0 ) or k 2 + 1 > 3 k 2 k^2 + 1 > 3 \cdot k^2
The latter means 1 > 2 k 2 1 > 2 \cdot k^2 , or k 2 < 1 2 k^2 < \frac{1}{2} .

This has only solutions for 1 2 2 k 1 2 2 - \frac{1}{2} \sqrt{2} \leq k \leq \frac{1}{2} \sqrt{2} , but we have already defined k 1 k \geq 1 .
Therefore, no solution exists other than x = y = z = 0 x = y = z = 0 .

I'm not sure if this proof is valid though, as it would seem to say that x 2 + y 2 = 5 z 2 x^2+y^2=5z^2 has no integer solution other than x = y = z = 0 x=y=z=0 , when in fact 1 2 + 2 2 = 5 1 2 1^2+2^2=5\bullet1^2 , and that no solution (integer or not) exists for x 2 + y 2 = a z 2 , a 1 x^2+y^2=az^2,a≥1 . The problem occurs when you say that z y z≥y , as in fact the equation only implies that z 3 y z\sqrt{3}≥y is true.

Nick Turtle - 3 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...