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.

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 [10, p. 1010]. At the end of this introduction, we will point out various applications and earlier results connected with the Ptolemy-Alhazen problem.
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.
Let D be the unit disk {z ∈ C : |z| < 1}, and suppose that the circumference ∂D = {z ∈ C : |z| = 1} is a reflecting curve. This two-dimensional problem reads: Given two points z 1 , z 2 ∈ D , find u ∈ ∂D such that (z 1 , u, 0) = (0, u, z 2 ). (1.1) 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 a path of extremal 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 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 [6,12] s G (z 1 , z 2 ) = sup z∈∂G |z 1 − z 2 | |z 1 − z| + |z − z 2 | . (1.2) 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ö [13,14]; the interested reader is referred to [12] and the references there.
We study the Ptolemy-Alhazen interior problem and in our main result, Theorem 1.1, 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 noted that the Eq. (1.3) 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.3).
where u ∈ ∂D is the minimizing root of (1.3).
As we will see below, the minimizing root need not be unique. We have used Risa/Asir symbolic computation software [20] in the proofs of our results. We give a short Mathematica code for the computation of s D (z 1 , z 2 ) . Theorem 1.1 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 [18] have studied the exterior Ptolemy-Alhazen problem and computed the grazing angle of specular reflection (the complement of the equal angles of incidence and of reflection) using a quartic equation, which is not the same as (1.3). They did not consider the problem of finding the point of incidence in the case of specular reflection, which is solved through Eq. (1.3).
Mathematical theory of billiards also leads to similar studies: see for instance the paper by M. Drexler and M.J. Gander [9]. 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 reflection from a spherical mirror.

Algebraic solution to the Ptolemy-Alhazen problem
In this section, we prove Theorem 1.1 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 |z 1 −u|+|z 2 −u| 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 and arg(u(u − z 1 )) = arg(u(u − z 2 )). (2.2) Since the point u is on the ellipse |z − z 1 | + |z − z 2 | = r and satisfies uu = 1, we have

Proof of Theorem 1.1
From the Eq. (2.1), we have u 2 is real and its complex conjugate is also real. Hence, holds. Since u satisfies uu = 1, we have the assertion.

Remark 2.3
The solution of (1.3) includes all the tangent points of the ellipse |z − z 1 | + |z − z 2 | = |2 − uz 1 − uz 2 | and the unit circle. (See Figs. 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 Eq. (1.3). E.g., if z 1 = 0.5+(0.1·k)i, k = 1, .., 5, z 2 = 0.5, the Eq. (1.3) has two roots of modulus equal to 1 and two roots off the unit circle, see Fig. 3. Miller and Vegh [18] computed the grazing angle of specular reflection using a quartic self-inversive polynomial equation, which is not the same as (1.3). Note that all the roots of their equation have modulus equal to one. They 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 Fig. 3.
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.3) is self-inversive. Note that the points u and 1/u are obtained from each other by the inversion transformation w → 1/w .
It is clear from the compactness of the unit circle, that the function |z 1 − z|+|z 2 − z| attains its maximum and minimum on the unit circle. However, as a property of the Eq. (1.3) itself, the following results can also be derived.

Lemma 2.4 The Eq. (1.3) always has at least two roots of modulus equal to 1.
Proof Consider first the case, when z 1 z 2 = 0 . In this case, the Eq. (1.3) has two roots u, |u| = 1, with 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.3), then 1/u 0 also is a root of (1.3). 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 coincides with (1.3). Therefore, the coefficient of degree two of (2.3) vanishes, and we have The absolute value of the left hand side of (2.4) satisfies (2.5) On the other hand, the absolute value of the right hand side of (2.4) satisfies because the function f (x) = x + 1 x is monotonically decreasing on 0 < x ≤ 1 and f (1) = 2. The inequalities (2.5) and (2.6) imply that the equality (2.4) never holds. Hence (1.3) has roots of modulus equals to 1.
Remark 2. 5 We consider here several special cases of the Eq. (1.3) and for some special cases, we give the corresponding formula for the s D metric which readily follows from Corollary 1.2.

Exterior Problem
Given z 1 , z 2 ∈ C \ D, find the point u ∈ ∂D such that the sum |z 1 − u| + |z 2 − u| is minimal.
Lemma 2. 6 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. 7 The above equation coincides with the Eq. (1.3) for the "interior problem", since Theorem 1.1 could be proved without using the assumption z 1 , z 2 ∈ D.
Remark 2. 8 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 the unit circle, and the triangular ratio metric s C\D (z 1 , z 2 ) = 1.

Lemma 2.9
The boundary of B s (z, t) = {w ∈ D : s D (z, w) < t} is included in an algebraic curve.
Hence, the boundary of B s (c, t) is included in the algebraic curve defined by the equation B c,t (w) = 0.
Remark 2. 10 The algebraic curve {w : B(w) = 0} does not coincide with the boundary ∂ B s (c, t). There is an "extra" part of the curve since the Eq. (2.9) contains extraneous solutions.
The analytic formula in Corollary 1.2 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.1 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. Figure 4 was drawn with the help of this algorithm. One can also use numerical methods to compute s D , see [6].

Geometric Approach to the Ptolemy-Alhazen Problem
In this section, the unimodular roots of Eq. (1.3) 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-and-compass construction. Neumann [19] 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.
The Eq. (3.1) defines a curve passing through 0, z 1 and z 2 , that is a cubic if z 1 +z 2 = 0, respectively, a conic section if z 1 + z 2 = 0 with z 1 , z 2 ∈ C * . Then, under the This is a conic section, that degenerates to a line if z 1 z 2 = 0 with z 1 , z 2 not both zero.
The points of intersection of the unit circle with the conic section (3.3) are shown in Fig. 5.

Proof The Eq. (3.3) is equivalent to
The curve passes through the points 0 and 2c = 1 z 1 + 1 z 2 . If u satisfies (3.4), then 2c − u also satisfies (3.4); therefore, has the center c. Since z 1 and z 2 are on the cubic curve given by (3.1), 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: 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 The Eq. (3.5) 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.5 (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 3 . Proof Consider a triangle with vertices z 1 , z 2 , z 3 and denote by z H and z C the orthocenter and the circumcenter, respectively. By Sylvester's theorem, Lemma 3.5,

By Euler's straightline theorem, z H
Let h be the orthocenter of the triangle with vertices 0, 1 z 1 , 1 z 2 . The above formula implies is a real number, hence f (h) = 0.
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.
If |z 1 | > |z 2 |, then g (0) > 0 > g(α) and g (π − α) < 0 < g (π ). The Eq.  (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 Eq. (1.3) 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 Sect. 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.4, 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 [5,7,8,[15][16][17].
Proof Assume that P has two double zeros a and b on the unit circle, a, b ∈ ∂D, a = b). Since the coefficient of u 2 in P (u) vanishes, This contradicts the assumption |a| = |b| = 1.
Similarly, we rule out another case. Then

Lemma 4.2 For P(u)
. The coefficient of u 2 in P (u) vanishes,

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 |.

Example 4.4
Find the relation between z 1 , z 2 such that P(u) = z 1 z 2 u 4 −(z 1 +z 2 )u 3 + (z 1 + z 2 )u − z 1 z 2 has the triple zero 1 and the simple zero (−1). Suppose From the constant term of (1.3) and (4.1), we have z 1 z 2 ∈ R. Similarly, from the coefficient of u in (1.3) and (4.1), we have Therefore z 1 and z 2 coincide with the two solutions of w 2 − 2 pw + p = 0, where p = z 1 z 2 ∈ R (in particular −1 < p < 1 for the interior problem).
Moreover, we can parametrize two foci as follows, It remains to study the following cases: Case 1. P has four simple unimodular zeros. Case 2. P has two simple unimodular zeros and two zeros that are not unimodular. Case 3. P has a double unimodular zero and two simple unimodular zeros.
Proof Let f be a complex polynomial. The location of the zeros of the derivative f of f is connected with the location of the zeros of f . Gauss-Lucas theorem [17,Thm. 6.1] shows that the zeros of the derivative f lie within the convex hull of the set of zeros of f . In particular, if all the zeros of f lie on the unit circle, then all the zeros of f lie in the closed unit disk (and f is self-inversive). The converse holds by a theorem of Cohn [8] stating 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. In our case P (u) = 4z 1 z 2 u 3 −3 (z 1 + z 2 ) u 2 +(z 1 + z 2 ) and P (u) = 12z 1 z 2 u 2 − 6 (z 1 + z 2 ) u. a) Assume that |z 1 + z 2 | < |z 1 z 2 |. Then for u ∈ ∂D we have 4z 1 z 2 u 3 = 4 |z 1 z 2 | > 4 |z 1 + z 2 | ≥ −3 (z 1 + z 2 ) u 2 + (z 1 + z 2 ) It follows by Rouché's theorem [22, 3.10] that the derivative P has all its zeros in the unit disk. By Cohn's theorem cited above, P has all its four zeros on the unit circle ∂D.
Assume that the polynomial f is self-inversive. By [7, Thm.1], the following are equivalent: (i) all the zeros of f are simple and unimodular; (ii) there exist a polynomial g having all its zeros in the unit disk |z| < 1, a nonnegative integer m and a real number θ such that f (z) = z m g (z) + e iθ g * (z) for all z ∈ C. Here g * (z) := z n g 1 z , where n = deg Q.
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. Given a self-inversive polynomial f , it is proved in [5,Lem.] that each unimodular zero of the derivative f is also a zero of f . If P has a unimodular zero a, then P (a) = 0; 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, the second derivative 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. Then P (u) = z 1 z 2 (u − a) (u − b) (u − c) u − 1