The Ptolemy-Alhazen problem and spherical mirror reflection

An ancient optics problem of Ptolemy, studied later by Alhazen, is discussed. This problem deals with reflection of light in spherical mirrors. Mathematically this reduces to the solution of a quartic equation, which we solve and analyze using a symbolic computation software. Similar problems have been recently studied in connection with ray-tracing, catadioptric optics, scattering of electromagnetic waves, and mathematical billiards, but we were led to this problem in our study of the so-called triangular ratio metric.


Introduction
The Greek mathematician Ptolemy (ca. 100-170) formulated a problem concerning reflection of light at a spherical mirror surface: Given a light source and a spherical mirror, find the point on the mirror where the light will be reflected to the eye of an observer.
Alhazen (ca. 965-1040) was a scientist who lived in Iraq, Spain, and Egypt and extensively studied several branches of science. For instance, he wrote seven books about optics and studied e.g. Ptolemy's problem as well as many other problems of optics and is considered to be one of the greatest researchers of optics before Kepler [2]. Often the above problem is known as Alhazen's problem [9, p.1010].
We will consider the two-dimensional version of the problem and present an algebraic solution for it. The solution reduces to a quartic equation which we solve with symbolic computation software.
Here ∡(z, u, w) denotes the radian measure in (−π, π] of the oriented angle with initial side [u, z] and final side [u, w] . This equality condition for the angles says that the angles of incidence and reflection are equal, a light ray from z 1 to u is reflected at u and goes through the point z 2 . Recall that, according to Fermat's principle, light travels between two points along the path that requires the least time, as compared to other nearby paths. One proves that u = e it 0 , t 0 ∈ R satisfies (1.1) if and only if t 0 is a critical point of the Figure 1. Light reflection on a circular arc: The angles of incidence and reflection are equal. Ptolemy-Alhazen interior problem: Given z 1 and z 2 , find u . The maximal ellipse contained in the unit disk with foci z 1 and z 2 meets the unit circle at u .
function t → |z 1 − e it | + |z 2 − e it |, t ∈ R. In particular, condition (1.1) is satisfied by the extremum points (a minimum point and a maximum point, at least) of the function u → |z 1 − u| + |z 2 − u|, u ∈ ∂D . We call this the interior problem-there is a natural counterpart of this problem for the case when both points are in the exterior of the closed unit disk, called the exterior problem. Indeed, this exterior problem corresponds to Ptolemy's questions about light source, spherical mirror, and observer. As we will see below, the interior problem is equivalent to finding the maximal ellipse with foci at z 1 , z 2 contained in the unit disk, and the point of reflection u ∈ ∂D is the tangent point of the ellipse with the circumference. Algebraically, this leads to the solution of a quartic equation as we will see below.
We met this problem in a different context, in the study of the triangular ratio metric s G of a given domain G ⊂ R 2 defined as follows for z 1 , z 2 ∈ G [11] (1.2) s G (z 1 , z 2 ) = sup By compactness, this supremum is attained at some point z 0 ∈ ∂G . If G is convex, it is simple to see that z 0 is the point of contact of the boundary with an ellipse, with foci z 1 , z 2 , contained in G . Now for the case G = D and z 1 , z 2 ∈ D , if the extremal point is z 0 ∈ ∂D , the connection between the triangular ratio distance and the Ptolemy-Alhazen interior problem is clear: u=z 0 satisfies (1.1). Note that (1.1) is just a reformulation of a basic property of the ellipse with foci z 1 , z 2 : the normal to the ellipse (which in this case is the radius of the unit circle terminating at the point u) bisects the angle formed by segments joining the foci z 1 , z 2 with the point u . During the past decade, the s G metric has been studied in several papers e.g. by P. Hästö [12,13]; the interested reader is referred to [11] and the references there.
We study the Ptolemy-Alhazen interior problem and in our main result, Theorem 1.3, we give an equation of degree four that yields the reflection point on the unit circle. Standard symbolic computation software can then be used to find this point numerically. We also study the Ptolemy-Alhazen exterior problem.
It should be noticed that the equation (1.4) may have roots in the complex plane that are not on the unit circle, and of the roots on the unit circle, we must choose one root u , that minimizes the sum |z 1 − u| + |z 2 − u| . We call this root the minimizing root of (1.4).
where u ∈ ∂D is the minimizing root of (1.4) .
As we will see below, the minimizing root need not be unique. We have used Risa/Asir symbolic computation software [19] in the proofs of our results. We give a short Mathematica code for the computation of s D (z 1 , z 2 ) . Theorem 1.3 is applicable not merely to light signals but whenever the angles of incidence and reflection of a wave or signal are equal, for instance in the case of electromagnetic signals like radar signals or acoustic waves. H. Bach [4] has made numerical studies of Alhazen's ray-tracing problem related to circles and ellipses. A.R. Miller and E. Vegh [17] have studied the Ptolemy-Alhazen problem in terms of quartic equations. However, their quartic equation is not the same as (1.4). Mathematical theory of billiards also leads to similar studies: see for instance the paper by M. Drexler and M.J. Gander [8]. The Ptolemy-Alhazen problem also occurs in computer graphics and catadioptric optics [1]. The well-known lithograph of M. C. Escher named "Hand with reflecting sphere" demonstrates nicely the idea of catadioptric optics.

Algebraic solution to the Ptolemy-Alhazen problem
In this section we prove Theorem 1.3 and give an algorithm for computing s D (z 1 , z 2 ) for z 1 , z 2 ∈ D .
Problem 2.1. For z 1 , z 2 ∈ D, find the point u ∈ ∂D such that the sum |u − z 1 | + |u − z 2 | is minimal.
The point u is given as the point of tangency of an ellipse |z − z 1 | + |z − z 2 | = r with the unit circle.
Remark 2.2. For z 1 , z 2 ∈ D, if u ∈ ∂D is the point of tangency of an ellipse |z−z 1 |+|z−z 2 | = r and the unit circle, then r is given by In fact, from the "reflective property" ∡(z 1 , u, 0) = ∡(0, u, z 2 ) of an ellipse, the following holds Since the point u is on the ellipse |z − z 1 | + |z − z 2 | = r and satisfies uu = 1, we have 2.5. Proof of Theorem 1.3.

From the equation (2.3), we have
This implies (u − z 1 )(u − z 2 ) u 2 is real and its complex conjugate is also real. Hence, Since u satisfies uu = 1, we have the assertion.
Remark 2.6. The solution of (1.4) includes all the tangent points of the ellipse |z −z 1 |+|z − z 2 | = |2 − uz 1 − uz 2 | and the unit circle. (See Figures 1, 2.) . Figure 2 displays a situation where all the roots of the quartic equation have unit modulus. However, this is not always the case for the equation (1.4). E.g. if z 1 = 0.5 + (0.1 · k)i, k = 1, .., 5, z 2 = 0.5, the equation (1.4) has two roots of modulus equal to 1 and two roots off the unit circle. Miller and Vegh [17] have also studied the Ptolemy-Alhazen problem using a quartic equation, that is different from our equation and, moreover, all the roots of their equation have modulus equal to one.
We say that a polynomial P (z) is self-inversive if P (1/u) = 0 whenever u = 0 and P (u) = 0 . It is easily seen that the quartic polynomial in (1.4) is self-inversive. Note that the points u and 1/u are obtained from each other by the inversion transformation w → 1/w . Proof. Consider first the case, when z 1 z 2 = 0 . In this case the equation (1.4) has two roots u, |u| = 1, with u 2 = z 1 /z 1 ∈ ∂D if z 2 = 0, z 1 = 0 . (The case z 1 = z 2 = 0 is trivial.) Suppose that the equation has no root on the unit circle ∂D .
By the invariance property pointed out above, if u 0 ∈ C \ ({0} ∪ ∂D) is a root of (1.4) , then 1/u 0 also is a root of (1.4). Hence the number of roots off the unit circle is even and the number of roots on the unit circle must also be even. We will now show that this even number is either 2 or 4 .
Let a, b, α, β ∈ R, 0 < a < 1, 0 < b < 1 , and let be the four roots of the equation (1.4) . Then, the equation coincides with (1.4). Therefore, the coefficient of degree 2 of (2.8) vanishes, and we have The absolute value of the left hand side of (2.9) satisfies On the other hand, the absolute value of the right hand side of (2.9) satisfies because the function f (x) = x + 1 x is monotonically decreasing on 0 < x ≤ 1 and f (1) = 2. The inequalities (2.10) and (2.11) imply that the equality (2.9) never holds. Hence (1.4) has roots of modulus equals to 1.
Remark 2.12. We consider here several special cases of the equation (1.4) and for some special cases we give the corresponding formula for the s D metric which readily follows from Corollary 1.5. Figure 2. This figure indicates the four solutions of (1.4) (dots on the unit circle) and the ellipse that corresponds to each u, for z 1 = 0.5 + 0.5i, z 2 = −0.8i. The figure on the lower right shows the point u that gives the minimum.
The roots are: The equation (1.4) reduces now to: Then we see that u 1,2 = ± z |z| are roots. The other roots are: Using a rotation around the origin and a change of orientation we may assume that arg Note that Case 4 includes Cases 2 and 3 (for α = π 2 , respectively α = 0) .
Denoting z 2 = z we have: Lemma 2.14. If the segment [z 1 , z 2 ] does not intersect with ∂D, the point u is given as a solution of the equation Remark 2.15. The above equation coincides with the equation (1.4) for the "interior problem", since Theorem 1.3 could be proved without using the assumption z 1 , z 2 ∈ D.
Remark 2.16. The equation of the line joining two points z 1 and z 2 is given by Then, the distance from the origin to this line is Therefore, if two points z 1 , z 2 satisfy  Proof. Without loss of generality, we may assume that the center point z =: c is on the positive real axis. Then, where u is a minimizing root of the equation holds if and only if c = 0 and t = 0. Therefore we may assume that c = 0, t = 0 and w ≡ 0 . Now, consider the following system of equations s D (c, w) = t and U c (w) = 0, i.e, The above two equations have a common root if and only if both of polynomials S c,t (w) and U c (w) have non-zero leading coefficient with respect to u variable and the resultant satisfies resultant u (S c,t , U c ) = 0. Using the "resultant" command of the Risa/Asir software, Moreover, we can check that and Hence, the boundary of B s (c, t) is included in the algebraic curve defined by the equation B c,t (w) = 0 . The analytic formula in Corollary 1.5 for the triangular ratio metric s D (z 1 , z 2 ) is not very practical. Therefore we next give an algorithm based on Theorem 1.3 for the evaluation of the numerical values.
Algorithm. We next give a Mathematica algorithm for computing s D (x, y) for given points x, y ∈ D .

Geometric approach to the Ptolemy-Alhazen problem
In this section the unimodular roots of equation (1.4) are characterized as points of intersection of a conic section and the unit circle, then n such roots are studied, where n = 4 in the case of the exterior problem and n = 2 in the case of the interior problem. We describe the construction of the conic section mentioned above. Except in the cases where 0, z 1 , z 2 are collinear or |z 1 | = |z 2 | , the construction cannot be carried out as ruler-andcompass construction. Neumann [18] proved that Alhazen's interior problem for points z 1 , z 2 is solvable by ruler and compass only for (Rez 1 , Imz 1 , Rez 2 , Imz 2 ) belonging to a null subset of R 4 , in the sense of Lebesgue measure.
Remark 3.6. If u ∈ ∂D, then (3.2) (respectively, (3.5)) holds if and only if , π}, then Γ consists of the parallels d 1 , d 2 through c to the bisectors (interior, respectively exterior) of the angle ∡(z 1 , 0, z 2 ) . In the other cases Γ is an equilateral hyperbola having the asymptotes d 1 and d 2 .
Proof. The equation (3.5) is equivalent to The curve Γ passes through the points 0 and 2c = 1 z 1 + 1 z 2 . If u satisfies (3.8), then 2c − u also satisfies (3.8), therefore Γ has the center c . Since z 1 and z 2 are on the cubic curve given by (3.2), Γ passes through 1 z 1 and 1 z 2 . The conic section Γ is a pair of lines if and only if Γ passes through its center. For u = 1 therefore Γ is a pair of lines if and only if z 1 z 2 + z 2 z 1 ∈ R. The following conditions are equivalent: (1) z 1 z 2 + z 2 z 1 ∈ R; (2) z 2 z 1 ∈ R or z 2 z 1 = 1; (3) |arg z 1 − arg z 2 | ∈ {0, π} or |z 1 | = |z 2 |. Denote u = x + iy. Using a rotation around the origin and a reflection we may assume that arg z 2 = − arg z 1 =: α, where 0 ≤ α ≤ π 2 . In this case the equation of Γ is (3.9) shows that Γ is the pair of lines d 1 , d 2 if |z 1 | = |z 2 | or sin 2α = 0, otherwise Γ is an equilateral hyperbola having the asymptotes d 1 and d 2 .
Lemma 3.10 (Sylvester's theorem). In any triangle with vertices z 1 , z 2 , z 3 the orthocenter z H and the circumcenter z C satisfy the identity z H + 2z C = z 1 + z 2 + z 3 .
Proof. Let z G be the centroid of the triangle. It is well-known that z G = z 1 +z 2 +z 3
In the cases where h ∈ 0, 1 z 1 , 1 z 2 , we choose a vertex of the hyperbola Γ as the fifth point needed to construct Γ . The vertices of the equilateral hyperbola Γ are the intersections of Γ with the line passing through the center of the hyperbola, with the slope m = 1 if |z 1 | > |z 2 | , respectively m = −1 if |z 1 | < |z 2 | . Let α := arg z 2 −arg z 1 2 . Using (3.9) it follows that the distance d between a vertex and the center of Γ is d = If h = 0 we have α = π 4 and d = 1 being similar. Then |z 2 | = |z 1 | cos 2α < |z 1 | and |z 1 | 2 − |z 2 | 2 = |z 1 − z 2 | 2 , therefore Let z 3 be the orthogonal projection of 1 z 1 on the line joining 1 z 2 to the origin. Then d = 1 3 . We see that a vertex of Γ can be constructed with ruler and compass if h ∈ 0, 1 z 1 , 1 z 2 .
Remark 3.13. Being symmetric with respect to the center of Γ, 1 z 1 and 1 z 2 belong to distinct branches of Γ, each branch being divided by 1 z 1 or 1 z 2 into two arcs. If z k ∈ C\D , k ∈ {1, 2} , then each of these arcs joins 1 z k , that is in the unit disk, with some point exterior to the unit disk, therefore it intersects the unit circle. It follows that, in the case of the exterior problem, Γ intersects the unit circle at four distinct points.
In the following we identify the points of intersection of the conic section Γ given by (3.5) with the unit circle. After finding the points u ∈ ∂D ∩ Γ it is easy to select among these the points u for which (1.1) holds, respectively for which |u − z 1 | + |u − z 2 | attains its minimum or its maximum on ∂D .
Proposition 3.14. If the conic section Γ given by (3.5) is a hyperbola, then the intersection of Γ with the unit circle consists of (i) four distinct points if z 1 , z 2 ∈ C \ D, one in the interior of each angle determined by the lines that pass through the origin and z 1 , respectively z 2 ; (ii) at least two distinct points if z 1 , z 2 ∈ D, one in the interior of the angle determined by the rays passing starting at the origin and passing through z 1 , respectively z 2 and the other in the interior of the opposite angle.
Proof. The intersection of Γ with the unit circle consists of the points u = e it , t ∈ (−π, π] satisfying Im z 1 z 2 e i2t − (z 1 + z 2 ) e −it = 0 . Let z 1 , z 2 ∈ C * . There are at most four points of intersection of Γ and the unit circle, since these are the roots of the quartic equation (1.4).
Corollary 3.16. The equation (1.4) has four distinct unimodular roots in the case of the exterior problem and has at least two distinct unimodular roots in the case of the interior problem.

Remarks on the roots of the equation (1.4)
In this section we study the number of the unimodular roots of the equation (1.4) (i.e., the roots lying on the unit circle) and their multiplicities. Denote P (u) = z 1 z 2 u 4 − (z 1 + z 2 )u 3 + (z 1 + z 2 )u − z 1 z 2 . If either z 1 = 0 or z 2 = 0 then the cubic equation (1.4) P (u) = 0 has a root u = 0 and two simple roots on the unit circle.
We will assume in the following that z 1 = 0 and z 2 = 0 . As we observed in Section 2, the quartic polynomial P is self-inversive. Then P has an even number of zeros on the unit circle, each zero being counted as many times as its multiplicity. According to Lemma 2.7 P has at least two unimodular zeros, distinct or not, that is P has four or two unimodular zeros. There is a rich literature dealing with the location of zeros of a complex self-inversive polynomial with respect to the unit circle. After the publication of [7], also many other papers on this topic were published, see [5], [6], [14], [15], [16].
Recall that the celebrated Gauss-Lucas theorem shows that the zeros of the derivative P ′ of a complex polynomial P lie within the convex hull of the set of zeros of P . If a complex polynomial P has all its zeros on the unit circle, then the polynomial is self-inversive and, according to Gauss-Lucas theorem [16,Thm 6.1] all the zeros of P ′ are in the closed unit disk. Moreover, the converse holds. A theorem of Cohn [7] states that a complex polynomial has all its zeros on the unit circle if and only if the polynomial is self-inversive and its derivative has all its zeros in the closed unit disk. A refinement of Cohn's theorem [6,Theorem 1] proves that all the zeros of a self-inversive polynomial P (z) lie on the unit circle and are simple if and only if there exists a polynomial Q(z) with all its zeros in the unit disk |z| < 1 such that P (z) = z m Q (z) + e iθ Q * (z) for some nonnegative integer m and real θ , where Q * (z) = z n Q 1 z , where n = deg Q. A lemma in [5] shows that each unimodular zero of the derivative of a self-inversive polynomial P is also a zero of P .
Proof. Assume that P has two double zeros a and b on the unit circle, This contradicts the assumption |a| = |b| = 1 .
Similarly, we rule out another case.
Lemma 4.2. For P (u) = z 1 z 2 u 4 − (z 1 + z 2 )u 3 + (z 1 + z 2 )u − z 1 z 2 it is not possible to have a double zero on the unit circle and two zeros not on the unit circle.
Proof. Assume that P has a double zero a with |a| = 1 and the zeros b = 1 b . Then Lemma 4.3. If P (u) = z 1 z 2 u 4 − (z 1 + z 2 )u 3 + (z 1 + z 2 )u − z 1 z 2 has a triple zero a and a simple zero b, then b = −a, with a and b lying on the unit circle and |z 1 + z 2 | = 2 |z 1 z 2 | .
An alternative way to prove that P has exactly two unimodular zeros is indicated below. Assume by contrary that P has four unimodular zeros. Using the Gauss-Lucas theorem two times, it follows that each of the derivatives P ′ and P ′′ has all its zeros in the closed unit disc |z| ≤ 1. The zeros of P ′′ are 0 and z 1 +z 2 2z 1 z 2 . Then, under the assumption |z 1 + z 2 | > 2 |z 1 z 2 |, the second derivative P ′′ has a zero in |z| > 1, which is a contradiction. c) Assume that P has four simple unimodular zeros. Then P ′ has all its zeros in the closed unit disk. If P ′ has a unimodular zero a, then P (a) = 0 according to [5], therefore a is a zero of P of multiplicity at least 2, a contradiction. It follows that P ′ has all its zeros in the unit disk. By Gauss-Lucas theorem, P ′′ also has all its zeros in the unit disk, therefore |z 1 + z 2 | < 2 |z 1 z 2 |. d) Now suppose that P has exactly two simple unimodular zeros, a and b. Let c and 1 c the other zeros of P , with |c| < 1. < 1 2 and |c| |c| 2 +1 < 1 2 , we get |a + b| < 1. Considering the coefficient of u 3 in P (u) we obtain z 1 +z 2 z 1 z 2 = a + b + c + 1 c . Then Example 4.7. Let z 1 = (1 + t) e iα and z 2 = (1 + t)e i(α+t) , where t > 0 and α ∈ (−π, π]. By Corollary 3.16, the equation (1.4) has four simple unimodular roots in this case. On the other hand, |z 1 +z 2 | |z 1 z 2 | = (1 + t) (1 + e −it ) → 2 as t → 0, therefore the constant 2 in Proposition 4.6 c) cannot be replaced by a smaller constant.
We give a direct proof for the following consequence of Proposition 4.6.
Proof. Assume that P has one double unimodular zero a and two simple unimodular zeros b, c. Then P (u) = z 1 z 2 (z − a) 2 (z − b) (z − c).