# Can the distance from the vertices of a square of integer width to an inscribed circle all be integer?

I'm looking for solutions to the following British Mathematical Olympiad question:

Suppose that $ABCD$ is a square and that $P$ is a point which is on the circle inscribed in the square. Determine whether or not it is possible that $PA$, $PB$, $PC$, $PD$ and $AB$ are all integers.

I first assumed that $AB=2$, Therefore, the radius of our circle $r=1$, so we have the Cartesian equation of the circle:

$$x^{2}+y^{2}=1$$

Which gives us the parametric equations:

$$x=\cos{\theta} \\ y=\sin{\theta}$$

Therefore, any arbitrary point $P$ on the circle can be written $P(\cos{\theta},\sin{\theta})$, for some $\theta\in[0,2\pi]$. As we know the position vectors for each of the points $A(1,1)$, $B(1,-1)$, $C(-1,-1)$ and $D(-1,1)$, we can find the vectors:

$$\overrightarrow{AP}=\begin{pmatrix}\cos{\theta}-1 \\ \sin{\theta}-1\end{pmatrix} \\ \overrightarrow{BP}=\begin{pmatrix}\cos{\theta}-1 \\ \sin{\theta}+1\end{pmatrix} \\ \overrightarrow{CP}=\begin{pmatrix}\cos{\theta}+1 \\ \sin{\theta}+1\end{pmatrix} \\ \overrightarrow{DP}=\begin{pmatrix}\cos{\theta}+1 \\ \sin{\theta}-1\end{pmatrix}$$

And therefore, we have a general expression for the Euclidean norm of these vectors:

$$\|\overrightarrow{AP}\|=\sqrt{3-2\sqrt{2}\sin\left(\theta+\frac{\pi}{4}\right)} \\ \|\overrightarrow{BP}\|=\sqrt{3-2\sqrt{2}\sin\left(\frac{\pi}{4}-\theta\right)} \\ \|\overrightarrow{CP}\|=\sqrt{3+2\sqrt{2}\sin\left(\theta+\frac{\pi}{4}\right)} \\ \|\overrightarrow{DP}\|=\sqrt{3+2\sqrt{2}\sin\left(\frac{\pi}{4}-\theta\right)}$$

From this we can see $\not\exists \theta \in [0,2\pi]$ such that $\|\overrightarrow{AP}\|$,$\|\overrightarrow{BP}\|$,$\|\overrightarrow{CP}\|$ and $\|\overrightarrow{DP}\|$ are all integral. However, I cannot see how to prove that there is no $\theta$ such that they are all rational, and so cannot finish the proof, so is this proof salvageable?

-
In case anyone is looking for a positive example, it is a well-known open problem whether the distances from a point in a unit square to all four corners can be rational. So the additional circular constraint is necessary to make this a reasonable olympiad problem. –  Erick Wong Feb 15 '13 at 20:07
even if you show that this isn't possible for a square of side $2$ (and thus for all the squares of side $2k$ for rational $k$), you still need to show that this isn't possible for all the squares of side $\sqrt k$ –  mercio Feb 15 '13 at 20:11
@mercio Not sure how squares of side $\sqrt{3}$ are relevant here, since $|AB|$ is integral (hence rational up to a reasonable scaling). –  Erick Wong Feb 15 '13 at 22:15
@ErickWong : probably because I read over the part that said ".. and AB are all integers". –  mercio Feb 15 '13 at 22:17

We can rescale the square so that $AB = 2$, up to allowing the other distances to be rational.
Let $P(x,y)$ be a point on your circle (i.e. $x^2 + y^2 = 1$).

Then $AP^2 + CP^2 = (x-1)^2 + (y-1)^2 + (x+1)^2 + (y+1)^2 = 2x^2+2y^2+4 = 6$.
But $6$ is not the sum of two rational squares :

Suppose $a^2 + b^2 = 6c^2$ with $a,b,c$ integers with $c \neq 0$. Looking at this modulo $3$, we quickly get that $a \equiv b \equiv 0 \pmod 3$, and then that $c \equiv 0 \pmod 3$, etc. Thus $a,b,c$ are infinitely divisible by $3$, and so $a=b=c=0$ is the only solution.

-

there is no answer yet to that problem, check this:

http://mathworld.wolfram.com/RationalDistanceProblem.html

-