Generating Pythagorean triples

258 Views Asked by At

I'm asked to generate Pythagorean triples from the polynomial identity:

$$(X^2-1)^2 + (2X)^2=(X^2+1)^2$$ By substituting rational numbers $\frac p q$ for $X$. However, Pythagorean triples are just as the name says, it, three numbers. If I would substitute this number I get: $$(\left(\frac p q\right)^2-1)^2 + 4\left(\frac p q\right)^2=(\left(\frac p q\right)^2+1)^2$$

How would I get three integers from this? There are just two numbers involved, $p$ and $q$.

3

There are 3 best solutions below

4
On BEST ANSWER

It should be $$(p^2-q^2)^2+(2pq)^2=(p^2+q^2)^2,$$ where $p$ and $q$ are natural numbers such that $p>q$, $\gcd(p,q)=1$ and $p$ and $q$ have different parity.

Now, you can get all triples: $(d(p^2-q^2),d(2pq),d(p^2+q^2)),$ where $d$ is a natural number.

1
On

I don't see why you want to substitute in rationals. If you substitute in whole numbers for $X$ you get a Pythagorean triple $X^2-1,2X,X^2+1$. That is three numbers just like you are looking for. If you multiply your last by $q^2$ you clear the fractions and get the same triple based on $p$.

0
On

If we take the equation asis, it is not true unless $x=0$ or$X=1$. $$(x-1)^2+2x=(x+1)^2$$ $$(x^2-2X+1)+4X^2=(x^2+2X+1)$$ Subracting $x^2+2x+1$ from both sides we get $$4X^2-4X=0\Rightarrow4x(X-1)=0$$

A variation of the identity will work for all $n$ in generating triples where $C-A)=2.$ $$\mathbf{A=4n^2-1}$$ $$\mathbf{B=4n}$$ $$\mathbf{C=4n^2+1}$$