# Thread: pythagorean triple diophantine equation problem

1. ## pythagorean triple diophantine equation problem

Find all solutions to the equation $\displaystyle x^2 + 2y^2 = w^2$ with x>0, y>0, w>0.

I have several problems similar to this one and I do not understand how to do them. The chapter focuses on pythagorean tripes of $\displaystyle a^2 + b^2 = c^2$ but I can not figure out how to apply that when there are additional parts to the equation.

2. so, I mostly figured it out, but hopefully somebody can clarify something for me...

$\displaystyle x^2 + 2y^2 = w^2$
$\displaystyle 2y^2$ is always even due to the 2
so, when x is even, $\displaystyle x^2$ is even and $\displaystyle x^2 + 2y^2$ will be an even plus an even, so $\displaystyle w^2$ is even which means that w is even.
when x is odd, $\displaystyle x^2$ is odd and $\displaystyle x^2 + 2y^2$ will be an odd plus an even, so $\displaystyle w^2$ is odd which means that w is odd.
So x and w are both even or x and w are both odd, so w - x and w + x will always be even.

The equation becomes $\displaystyle 2y^2 = w^2 - x^2 = (w - x)(w + x)$
So I divide through by two, apparently just because I can since they are all even (is there another reason?) which gives me
$\displaystyle 2(y/2)^2 = [(w - x)/2][(w + x)/2]$
$\displaystyle (y/2)^2 = [(w - x)/4][(w + x)/2]$

Using an earlier theorem, i can say that $\displaystyle (w - x)/4 = u^2 and (w + x)/2 = v^2$

doing the math, that gives me $\displaystyle x = v^2 - 2u^2$ and $\displaystyle w = v^2 + 2u^2$ and this leads to the further result that $\displaystyle y = 2uv$

This result is correct according to the back of the book except for two things...
first, apparently since it wants all solutions, I multiply all my answers by $\displaystyle d$.
second, the book puts absolute value signs around the entire x answer. The actual answers are:
$\displaystyle x = |d(v^2 - 2u^2)|$
$\displaystyle w = d(v^2 + 2u^2)$
$\displaystyle y = 2duv$

The second problem I did, $\displaystyle x^2 + 3y^2 = w^2$, I did in much the same way except it does matter what y is in this case, so I end up not dividing through by 2. I end up with the equations $\displaystyle (w - x)/3 = u^2$ and $\displaystyle (w + x) = v^2$ I come up with the correct answer, but the answer for x is again enclosed with absolute value signs. The same answers result for the third equation of $\displaystyle x^2 + py^2 = w^2 for p is any odd prime$.

So where are the absolute value signs coming from? I barely understand the problems as it is and the book of course does not mention absolute values in the section.

3. Hello,
Originally Posted by Proggy
The equation becomes $\displaystyle 2y^2 = w^2 - x^2 = (w - x)(w + x)$
So I divide through by two, apparently just because I can since they are all even (is there another reason?)
You have to prove that y is even (which is actually easy since the RHS is at least divisible by 4)

which gives me
$\displaystyle 2(y/2)^2 = [(w - x)/2][(w + x)/2]$
$\displaystyle (y/2)^2 = [(w - x)/4][(w + x)/2]$

Using an earlier theorem, i can say that $\displaystyle (w - x)/4 = u^2 and (w + x)/2 = v^2$
Okay, I'm just curious what is this theorem ? How can one know that w-x is divisible by 4 ?

doing the math, that gives me $\displaystyle x = v^2 - 2u^2$ and $\displaystyle w = v^2 + 2u^2$ and this leads to the further result that $\displaystyle y = 2uv$

This result is correct according to the back of the book except for two things...
first, apparently since it wants all solutions, I multiply all my answers by $\displaystyle d$.
Yup.

Imagine you have d which divides x,y and w, hence x=dx', y=dy' and w=dw' :
$\displaystyle (dx')^2+2(dy')^2=(dw')^2$
Divide the equation by dē and you're back to the same equation.
Conversely, you get the same thing (that is if you multiply x,y and w by d, you'll get the same equation too)

second, the book puts absolute value signs around the entire x answer. The actual answers are:
$\displaystyle x = |d(v^2 - 2u^2)|$
$\displaystyle w = d(v^2 + 2u^2)$
$\displaystyle y = 2duv$
Because you can't tell whether u or v is the greatest and the solutions have to be > 0 ?

4. Originally Posted by Moo
Hello,

You have to prove that y is even (which is actually easy since the RHS is at least divisible by 4)
so, since both of the factors on the right are even and thus divisible by 2, then the left side is divisible by 2x2 or 4. So that makes y squared divisible by 2 and if it is divisible by 2, then it is divisible by 4 and y itself is divisible by 2 and even. That kinds of makes sense now. But my question then becomes why do I bother to divide both sides by 4? It seems like I come out with the exact same answer if I do not do the division and work out the math.

Originally Posted by Moo
Okay, I'm just curious what is this theorem ? How can one know that w-x is divisible by 4 ?
heh, well, the theorem i am referring to is the fact that a square is the product of two squares. The division by 4 comes from dividing both sides by the 2 in front of the y squared. So I do not really konw that w-x is divisible by 4, but one of them has to be disibile by 4 and the equations work out to be the same whichever one I divide by the extra 2. I am only figuring some of this out due to already knowing what the answers were for these particular problems. I can not seem to grasp all the concepts behind them.

Originally Posted by Moo
Yup.

Imagine you have d which divides x,y and w, hence x=dx', y=dy' and w=dw' :
$\displaystyle (dx')^2+2(dy')^2=(dw')^2$
Divide the equation by dē and you're back to the same equation.
Conversely, you get the same thing (that is if you multiply x,y and w by d, you'll get the same equation too)
I did try the math with the thought that (x,y,z)=d and then plugged in x'/d and so forth and proved to myself that the answer was the same as simply multiplying by d at the end.

Originally Posted by Moo
Because you can't tell whether u or v is the greatest and the solutions have to be > 0 ?
I know what you are saying here, but I do not understand it. Eliminating the negative sign simply because you want a positive number does not seem right. I would have expected it more to lead to saying that if it resulted in a negative number, then that simply was not a valid answer. But I do not see why removing the negative sign because it is inconvenient works. I mean I know it does, i just do not understand why it does.

I was really good at math before I got to Number Theory. It is a rather discouraging class, but maybe that is because I am trying it online. Abstract Algebra and Probablility and Statistics (not intro, but an advanced one) are my next two, and last math classes, I need for my grade 7-12 integrated math licensure. I seem to be struggling alot, even though I got 100 percent on my midterm because it was basically nowhere near as hard as the homework. Anyway, just rambling. Thanks for helping.