5

My question may appear a bit odd, maybe it does not even make sense.

The following is my problem: Given two linear equations $f(t)$ and $g(t)$, with $f(t)^2-g(t)^2 =Y^2$. Find $t$, so that $Y$ is an integer (or rational) number. In other words, how to construct a pythagorean triple out two linear equations?

To make the point more clear, I will illustrate it with an example:

Let $$f(t)=1+5t \qquad \text{and} \qquad g(t)=19+4t.$$ Then

$$(1+5t)^2-(19+4t)^2 = Y^2 = (t-18)(20+9t).$$

By trying different values, one finds $t=20$ and, as a solution, the triple $(20,99,101)$. This is perfect but also exactly what I'm not aiming at. My question is, rather, if there is another way to find $t$ besides try&error.

I have made a few thoughts. As a first attempt, I set both factors equal, that means $t-18 =20+9t$, ending up with $t=-19/4$. But this way, $g(t)$ becomes zero (which is not very interesting). Then I thought about bringing the whole thing a bit "out of balance“ by messing around with the factors. For this, I introduced a help-variable $H$, some random small number (say $H=11$), by which one of the factors shall be divided and the other multiplied. Since both factors are linear equations, this is an easy operation. For this example I chose the greater factor, meaning that $(20+9t)/11$. This gives $t= 11u-1$, right? Replacing $t$, one has $$(55u-4)^2-(44u+15)^2=(11u-19)(11+99u)=(121u-209)(1+9u).$$ See how the $11$ from the greater factor moved to the lesser? Now, equalling both factors, one has $121u-209=1+9u$, solving for $u=210/112=15/8$.

And indeed, a pythagorean triple appears, namely $(793/8,780/8,143/8)$. Removing the common factor 13/8, the primitive triple $(61,60,11)$ remains.

Well, I somehow answered my own question. But maybe you have some different ideas how to solve this problem? Feel free to share your thoughts. And thanks for reading, anyway!

Edit:

Thank you very much for the answers and suggestions. Your help is appreciated.

I think there is yet another solution path which works fine, if the target Pythagorean Triple is known (which is sadly not the case in the context where my problem arose, but anyway.)

For this, simply set up the proportion

$f(t) : g(t) = A : B$ , where $(A,B,C)$ is a triple.

For example let $f(t)=7+3t$, $g(t)=3+8t$ and $(A,B,C)=(8,15,17)$, then solve the linear system

$$7+3t=8u$$ $$3+8t=15u$$

The solution is $t=81/19$.

emel
  • 51
  • I have edited my formula to show linear equations that generate Pythagorean triples. Please take a look. Thanks. – poetasis Oct 25 '24 at 13:46

4 Answers4

2

I do not know of any linear equation formula that generates all primitive Pythagorean triples but we can show the development of one that generates a subset of them.

The following formula generates all triples where $\,GCD(A,B,C)\,$ is an odd square which includes all primitive where $\,GCD(A,B,C)=1^2.\,$ These are sets of triples as indicated in the table below it.

\begin{align*} &A=(2n-1)^2+2(2n-1)k\\ &B=\phantom{(2n-1)^2+{}} 2(2n-1)k+2k^2\\ &C=(2n-1)^2+2(2n-1)k+2k^2 \end{align*}

$$\begin{array}{c|c|c|c|c|c|c|} n & k=1 & k=2 &k=3 & k=4 & k=5\\ \hline Set_1&3,4,5 &5,12,13&7,24,25&9,40,41&11,60,61\\ \hline Set_2&15,8,17&21,20,29 &27,36,45 &33,56,65&39,80,89\\ \hline Set_3&35,12,37&45,28,53&55,48,73&65,72,97&75,100,125\\ \hline Set_{4}&63,16,65&77,36,85&91,60,109&105,88,137&119,120,169\\ \hline Set_{5}&99,20,101&117,44,125&135,72,153&153,104,185&171,140,221\\ \hline \end{array}$$

If we let $\,k=1,\,$ we get the first column of triples and the formula becomes $$A=4n^2-1\qquad B=4n \qquad C=4n^2+1$$ If we let $\, C=f(n)\,$ and $\,A=g(n),\,$ we get for example when $\,n=2,\,$

$$f(2)=4\cdot 2^2+1=17\\ g(2)=4\cdot 2^2-1=15\\ \longrightarrow\quad 17^2-15^2=8^2$$

The formulae above generates Pythagorean triples for all natural numbers. If, however, we are allowed to search for values of $\,t\,$ that satisfy Pythagorean triple criteria, we can replace $\,n^2\,$ in that formula by $\,t\,$ and get $$\,f(t)=4t+1\qquad g(t)=4t-1$$ and find examples like $$f(1)=4\cdot1+1=5\quad g(1)=4\cdot1-1=3 \longrightarrow 5^2-3^2=4^2\\ f(4)=4\cdot4+1=17\quad g(4)=4\cdot4-1=15 \longrightarrow 17^2-15^2=8^2\\ f(9)=4\cdot9+1=37\quad g(9)=4\cdot9-1=35 \longrightarrow 37^2-35^2=12^2\\$$

By these examples we can see that $\,t\,$ can be the square of any natural number and satisfy the Pythagorean triple criteria.

poetasis
  • 6,795
1

COMMENT.-It cannot be a Pythagorean identity with linear terms because all Pythagorean triples are parameterized by well known quadratic forms. However it is not impossible that for particular values of the variable $t$ the function $h(t)=(a+bt)^2-(c+dt)^2$ be an square. Even easy examples can be found for this, as the following one. $$(a+t)^2-(a-t)^2=4at\text{ where obviously t=4a yields an square }$$

Ataulfo
  • 32,657
0

Consider $(ax+b)^2+(cx+d)^2=(ex+f)^2$

$(a^2+c^2-e^2)x^2+(2ab+2cd-2ef)x+(b^2+d^2-f^2)=0$

Since above Equation is quadratic in x. To make it as Linear in x.

Method 1: Take $a^2+c^2-e^2=0$ (known solution) then solve for x, substitute x in equation to get a parametrization.

Method 2: Take $b^2+d^2-f^2=0$ (known solution) then solve for x, substitute x in equation to get a parametrization.

Method 3: Another way to get a one solution at a time is Take $a= c= e=1$ & $(b,d,f)$ is a known solution then substitute these in to an original equation,

$(x+b)^2+(x+d)^2=(x+f)^2$

$x^2+(2b+2d-2f)x+(b^2+d^2-f^2)=0$

Since $b^2+d^2-e^2=0$ so above equation reduces to

$x^2+(2b+2d-2f)x=0$

Discard $x=0$ because it gives not any new solution. Take $x=2f-2b-2d$ & substitute $x$ in original equation to get

$$(2f-b-2d)^2+(2f-2b-d)^2=(3f-2b-2d)^2$$ -----> (1)

Where $(b,d,f)$ is already a known solution.

Wkt square of an Integer is is always non negative, so negative values for $(b,d,f)$ can also be takened to get a primitive solutions

For example : Wkt $(-3,4,5)$ is a known solution & substitute it into a (1) After simplifying, you get a new primitive solution $(5,12,13)$.

0

I am Solving this problem in General,

Let $f(t)=at+b$ & $g(t)=ct+d$

Consider $f(t)^2 - g(t)^2=Y^2$

$(at+b)^2-(ct+d)^2 = Y^2$

$(a^2-c^2)t^2+(2ab-2cd)t+(b^2-d^2)=Y^2$

Take $A=a^2-b^2$ ,

$B=2ab-2cd$ &

$C=b^2-d^2$

$At^2+Bt+C=Y^2$ ---> (1)

Which is a Quadratic Diophantine Equation.

Multiply by $4A$ on both sides of above equation then we get

$4A^2t + 4ABt+4AC=4AY^2$

By completing the square we get

$(2At+B)^2+4AC-B^2=4AY^2$

$(2At+B)^2-4AY^2=B^2-4AC$

Let $X = 2At+B$ & $A$ is not a perfect square

$X^2-4AY^2=B^2-4AC$

Above equation can be Solved by Various Methods for Integer Solutions $(X,Y)$ & once it has an Integer solution then the original equation has an Infinitely Many Solutions(It is proved by below two theorems).

Theorem: let D be a positive integer that is not a perfect square then $x^2-Dy^2=1$ always has a solutions in positive integers. If $(x_1,y_1)$ is a fundamental solution with smallest $x_1$ then every solution $(x_k,y_k)$ can be obtained by taking powers

$x_k+y_k√D=(x_1,y_1√D)^k$ for $k=1,2,3...$

Theorem: If $(p,q)$ is a solution to the equation $x^2 − Dy^2 = M$ and $(r,s)$ is a solution to equation $x^2 − Dy^2 = 1$ then $(pr+Dqs,ps+qr)$ is also a solution to the equation $x^2 − Dy^2 = M$

To solve equation (1) for rational solutions. See my other below linked posts :

https://math.stackexchange.com/a/4885738/1296310

https://math.stackexchange.com/a/4884863/1296310

https://math.stackexchange.com/a/4904064/1296310

https://math.stackexchange.com/a/4904943/1296310