Finding rational points on a circle such that $X^2+Y^2=r^2=k \in \mathbb{Z}$

215 Views Asked by At

I am interested in finding rational points on a circle with radius $r$, such that $r^2=k$ is an arbitrary integer. I tried reducing the problem to the unit circle, and maybe use pythagorean triples as solutions and modify them accordingly, but this would require finding rational points on the unit circle whose denominator is divisible by $k$, and I do not see a way to do that. Note that $r$ is not necessarily an integer, only its square is necessarily an integer.

More formally, I am interested in finding rational solutions $(X,Y)$ to the equation

$$X^2+Y^2=k$$

where $k$ is an integer.

Is there any general way to do that? Can I then systematically create all solutions whose numerator and denominator are not larger than some bound $L$?

1

There are 1 best solutions below

2
On

The integer $\,r$-values that yield integer coordinates are the hypotenuses of Pythagorean triples and there are $\,2^{(n-1)}\,$ [primitive] triples for each, where $\,n\,$ is the number of distinct prime factors of $\,r.\quad$ There are $\,8\,$ pairs of integer coordinates (swapping x,y and sign) for every triple, e,g. $r=5\,\longrightarrow $$\big\{(3,4),(4,3),(-3,4),(-4,3),(-3,-4,),(-4,-3),(3-4),(4,-3)\big\}$

To find these triples, given a hypotenuse $(C)$, we begin with a form of Euclid's formula. Then we solve for $\,k\,$ and test a defined range of $\,m$-values to see which yield integers. If no integer $\,k$-values are found, there is no [primitive] Pythagorean triple for that $\,C$-value though there may imprimitives which are multiples of triples found using factors of $C$. $$A=m^2-k^2 \qquad B=2mk \qquad C=m^2+k^2$$ $$C=m^2+k^2\implies k=\sqrt{C-m^2}\\ \qquad\text{for}\qquad \bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \lfloor\sqrt{C-1}\rfloor$$ The lower limit ensures $m>k$ and the upper limit ensures $k\in\mathbb{N}.\quad$ One hypotenuse with two distinct prime factors is $\,65=5\cdot13$ and we should expect to find $\,2^{(2-1)}=2^1=2\,$ triples for that case. $$C=65\implies \bigg\lfloor\frac{ 1+\sqrt{130-1}}{2}\bigg\rfloor=6 \le m \le \lfloor\sqrt{65-1}\rfloor=8\quad \\ \text{and we find} \quad m\in\{7,8\}\Rightarrow k\in\{4,1\}\\$$ $$F(7,4)=(33,56,65)\qquad \qquad F(8,1)=(63,16,65)$$

Note that solutions also include \begin{equation} \,13\cdot(3,4,5)=(39,52,65)\, \text{ and } \,5\cdot(5,12,13)=(25,60,65) \end{equation} so there are $\,32\,$ rational coordinate pairs for $\,C=r=65$.

If $\,r\,$ is not one of these values, then rational $\,X$-values can be found when $\,\theta\in\big \{0,60˚,90˚,120˚,180˚,240˚,270˚,300˚\big\}$ and rational $\,Y$-values can be found when $\,\theta\in\big \{0,30˚,90˚,150˚,180˚,210˚,270˚,330˚\big\}.\quad$ In any case, the only rational values to be found for these are $\,0,\pm\dfrac{1}{2},\pm1.$

$\textbf{Edit:}\,$ If you can find the angle $\theta$ of the tangent $\,\big(\frac{B}{A}\big)\,$ of any Pythagorean triple, then $X=r\cos\theta$ and $Y=r\sin\theta$ and both will be rational if $\,r\,$ is rational.

There are an infinite number of these as shown in the sample following the formula that generated them below.

\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,6\\ \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,5&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}$$

A scatter plot of these sets is shown here.