How to find infinitely many positive integer solutions to this equation? $$x^2+y^2+z^2=w^2$$
Why my answer makes no sense:
$x=n$
$y=(n+1)$
$z=\sqrt{ 2n(n+1) }$
then $w^2=(n+(n+1))^2$ for some n
Thanks,
How to find infinitely many positive integer solutions to this equation? $$x^2+y^2+z^2=w^2$$
Why my answer makes no sense:
$x=n$
$y=(n+1)$
$z=\sqrt{ 2n(n+1) }$
then $w^2=(n+(n+1))^2$ for some n
Thanks,
On
Take an odd number $ W $ Find all quadruples $a,b,c,d$ with $$ a^2 + b^2 + c^2 + d^2 = W, $$ where we are allowed to mix order, take the variables to be positive, negative, or zero. Then all the primitive quadruples, odd entry first, are given by $$ \left( a^2 + b^2 - c^2 - d^2 \right)^2 + 4 \left( ad-bc \right)^2 + 4 \left(ac+bd \right)^2 = W^2. $$
......
On
If all you need to do is show there are infinitely many positive integer solutions $(x,y,z,w)$ to the equation $x^2+y^2+z^2=w^2$, it's enough to specify one solution, such as $(1,2,2,3)$ and then observe that $(k,2k,2k,3k)$ is also a solution for each $k\in\mathbb{Z}$. This is my preferred approach to homework problems of this type: Do no more work than absolutely necessary.
The OP's answer does make sense, but only for values of $n$ such that $z=\sqrt{2n(n+1)}\in\mathbb{Z}$. This requires $2n(n+1)=k^2$ for some $k\in\mathbb{Z}$, which is recognizable to number theorists as re-expressible in Pellian form as $(2n+1)^2-2k^2=1$. The elementary theory of Pell's equation guarantees the existence of infinitely many solutions.
If you want a relatively straightforward procedure that produces all integer solutions, start by letting $x$ be any odd number and $y$ be any even number, then let $a\cdot b$ be any factorization of $x^2+y^2$, after which solve the equations $w+z=a$ and $w-z=b$ for $w$ and $z$, i.e., $w=(a+b)/2$ and $z=(a-b)/2$. (Note that $a$ and $b$ are both odd since their product, $x^2+y^2$, is odd, so their sum and difference are divisible by $2$.) This produces a solution $(x,y,z,w)$ where $x$ is odd and $y$ is even.
It might come as a small surprise to discover that $z$ is always even, no matter what factorization $x^2+y^2=a\cdot b$ you use, and $w$ is always odd, but this can be explained with some simple mod $4$ arithmetic: Squares are congruent to $0$ or $1$ mod $4$, never $2$ or $3$, so if $x^2+y^2\equiv1$ mod $4$ and $x^2+y^2+z^2=w^2$, then we must have $z^2\equiv0$ mod $4$ and $w^2\equiv1$ mod $4$. We can now get other solutions by permuting $x$, $y$, and $z$ so that the odd number appears in any position, and by multiplying any solution $(x,y,z,w)$ by any power of $2$.
To see that this produces all solutions, note that $x$, $y$, and $z$ cannot all be odd, since if they were then $x^2+y^2+z^2$ would be congruent to $3$ mod $4$, while if $x$, $y$, and $z$ are all even, then so is $w$, in which case we can remove the largest power of $2$ they have in common and get back to a case where one variable is odd and the other two are even.
On
$x^2 + y^2 + z^2 = w^2$ if
$x^2 + y^2 =w^2 - z^2 = (w-z)(w+z)= M*(M-2k); M=w+z; k=z$
If $x^2 + y^2$ is any number $N$ that can be factored into two factors $M,J: N=M*J$ whose difference, $M - J=2k$ is an even number.
This can be:
$N$ is any odd number. Then $N=M*J$ where $M, J$ are prime and $M-J$ is even. And $x^2 + y^2$ will be odd if one of $x,y$ is even the other is odd.
SO $x = 2k$ and $y=2j+1$ then $x^2 + y^2 = 4k^2 + 4j^2 + 4j + 1$. Let $w=2k^2+2j^2 + 2j+1$ and $z= 2k^2+2j^2 + 2j$ so $x^2 + y^2 = w+z = (w+z)*1=(w+z)(w-z)=w^2 -z^2$ and $x^2 + y^2 + z^2 = w^2$.
$N$ is any multiple of $4$. If $N=4K$ and if $K = M*J$ ($J$ could be equal to $1$ then $N = (2M)*(2J)$ and $(2M - 2J)$ is even. This will occur of $x$ and $y$ are both even
So if $x = 2k$ and $y=2j$ and $x^2 + y^2 = 4k + 4j = (2k+2j)*(2)= ([k+j+1]+[k+j-1])([k+j+1]-[k+j-1])$. Let $w = k+j +1$ and $z=k+j-1$ and we have $x^2 + y^2=(w-z)(w+z) = w^2 - z^2$ so $x^2 + y^2 + z^2 = w^2$.
The only case that seems not to work is if $x,y$ are both odd.
And that can't work because if $x=2k+1$ and $y=2j+1$ then $x^2 + y^2 = 4(k^2 + k+j^2+j) + 2$ and if $x^2 + y^2 = w^2 -z^2 = (w-z)(w+z)$ then one of $(w-z)$ or $(w+z)$ must be even and the other odd and that's impossible.
....
So as long as $x$ and $y$ are not both odd we will be able to find at least one $w,z$ pair to make this true.
On
Take $x=(m^2-1), y=2m^2$, also $m=2k+1$.
So we get $x^2+y^2=t^2=(m^2+1)^2$, Now, take $t=2d$,
Where, $d=\frac{m^2+1}{2}$, also take $z=(t^2-1)$.
So, $w=(t^2+1)$
Combining these we get an algorithm as follows,
$x=(m^2-1), y=2m, \\ z=(\frac{m^2+1}{2})^2-1, w=(\frac{m^2+1}{2})^2+1$
For all odd integers $m$.
Assuming your first criteria is required, let's start with Euclid's formula in terms of $(m,k)$ to find triples where $B=A+1$. $$A=m^2-k^2\qquad B=2mk\qquad C=m^2+k^2$$
The difference $(B-A)= 2mk-m^2+k^2=1\implies m=\sqrt{2k^2+(-1)^k}$ and, starting with $k=1$, each value of $m$ provides the $k$-value needed for the next iteration of the formula.
For example
$1+\sqrt{2-1}=2$ and $F(2,1)=(3,4,5).$
$2+\sqrt{8+1}=5$ and $F(5,2)=(21,20,29)$.
$5+\sqrt{50-1}=12$ and $F(12,5)=(119,120,169)$....
There are an infinite number of these where $k$ and $m$ are consecutive Pell numbers. Only $19$ can be generated with $15$-digit precision but we can make quadruples out of triples. Given this first restriction, we need to find and examine quadruples like $\quad (3,4,12,13)\qquad (21,20,420,421)\qquad (119,120,14280,14281)\qquad (697,696,19392,19417)\text{ or } (697,696,485112,485113)$
One formula (mine) for generating Pythagorean triples is: $$A=(2n-1)^2+2(2n-1)k\qquad B=2(2n-1)k+2k^2\qquad C=(2n-1)^2+2(2n-1)k+2k^2$$ It reveals sets within the subset of triples where $GCD(A,B,C)=(2m-1)^2, m\in\mathbb{N}$. Side-C must be odd and we can see in the sample below that, in $Set_1$, side-A can be any odd number greater than one.
$$\begin{array}{c|c|c|c|c|c|c|} n & k=1 & k=2 & k=3 & k=4 & k=5 & k=6 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 & 13,84,85 \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 & 45,108,117 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 & 85,132,157 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 & 133,156,205 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 & 189,180,261 \\ \hline \end{array}$$
If we solve the $A$-function for $k$, we can find a matching $A$ with defined finite search limits. Any of the $n$-values that yield an integer $k$ gives us a triple.
$$A=(2n-1)^2+2(2n-1)k\quad\longrightarrow\quad k_A=\frac{A-(2n-1)^2}{2(2n-1)}\quad\text{where}\quad 1\le n\le\biggl\lfloor\frac{\sqrt{A+1}}{2}\biggr\rfloor $$ for example, beginning with $\qquad F(2,4)=(33,56,65)\qquad$ we have
$$\\ A=65\quad \longrightarrow \quad 1\le n\le\bigg\lfloor\frac{\sqrt{65+1}}{2}\bigg\rfloor=4 \quad\text{and we find} \quad n \in \{1,3\}\quad \Rightarrow \quad k\in\{32,4\}\\ $$ $$F(1,32)=(65,2112,2113)\qquad F(3,4)=(65,72,97)$$ One of these is in $Set_1$, the other is in $Set_3$ and they give us $2$ new quadruples.
$$33^2+56^2+2112^2=2113^4\quad\text{and}\quad 33^2+56^2+72^2=97^2$$ There is one or more such n-tuples for every Pythagorean triple so the tuples, perhaps, represent an even larger infinity than the triples.
$F(m,k)$ and $F(n,k)$ produce identical results if $(m=n-1+k)$ if that helps. $F(n,k)$ was shown only to make it clear that all triples can be extended. I hope this helps in finding triples to match the criteria of $z$ and $w$. On the other hand, if all you are looking for is $any$ $A^2+B^2+C^2=D^2$, I think we have found a solution.