This article is translated (while omitting some tedious calculations) from a Chinese article on my Zhihu account. The original article was posted at 2019-05-15 20:28 +0800.


Suppose PP is a point on the circle C\odot C with radius rr. Now we study the feature of the position of the point PP when the sum of the distances from PP to the two edges of O\angle O is extremal.

Set up Cartesian plane coordinates with the origin at OO and the xx-axis pointing from OO to CC. Suppose the coordinates of CC are (xC,0)\left(x_C,0\right), the coordinates of PP is (xC+rcosθ,rsinθ)\left(x_C+r\cos\theta,r\sin\theta\right), and the slope of the two sides of O\angle O are k1k_1 and k2k_2 respectively. Then, we have l1:k1xy=0,l2:k2xy=0.\begin{align*} l_1&:k_1x-y=0,\\ l_2&:k_2x-y=0. \end{align*}

Suppose d1k1(xC+rcosθ)rsinθk12+1,d2k2(xC+rcosθ)rsinθk22+1,\begin{align*} d_1&\coloneqq\frac{k_1\left(x_C+r\cos\theta\right)-r\sin\theta}{\sqrt{k_1^2+1}},\\ d_2&\coloneqq\frac{k_2\left(x_C+r\cos\theta\right)-r\sin\theta}{\sqrt{k_2^2+1}}, \end{align*} and then d1\left\|d_1\right\| and d2\left\|d_2\right\| are the distances from PP to l1l_1 and l2l_2 respectively. The sum of the distances d=d1+d2\left|d\right|=\left|d_1\right|+\left|d_2\right| (the definition of dd here are discussed case by case below).

Now, we discuss case by case.

Case 1: d1d_1 and d2d_2 have the same sign

In this case, PP is on the same “side” of l1l_1 and l2l_2, i.e. PP is in the interior of the adjacent supplementary angle of O\angle O.

Suppose dd1+d2,d\coloneqq d_1+d_2, and then d\left\|d\right\| is the sum of distances from PP to l1l_1 and l2l_2, so we just need to discuss the case when dd is extremal.

Let dCxC(k1k12+1+k2k22+1),d_C\coloneqq x_C\left(\frac{k_1}{\sqrt{k_1^2+1}}+\frac{k_2}{\sqrt{k_2^2+1}}\right), Ar(k1k12+1+k2k22+1)2+(1k12+1+1k22+1)2,A\coloneqq r\sqrt{\left(\frac{k_1}{\sqrt{k_1^2+1}}+\frac{k_2}{\sqrt{k_2^2+1}}\right)^2 +\left(\frac1{\sqrt{k_1^2+1}}+\frac1{\sqrt{k_2^2+1}}\right)^2}, ϕarctan1k12+1+1k22+1k1k12+1+k2k22+1.\phi\coloneqq\arctan\frac{\frac1{\sqrt{k_1^2+1}}+\frac1{\sqrt{k_2^2+1}}}{\frac{k_1}{\sqrt{k_1^2+1}}+\frac{k_2}{\sqrt{k_2^2+1}}}. Then, we have d=dC+AcosϕcosθAsinϕsinθ=dC+Acos(ϕ+θ).\begin{align*} d&=d_C+A\cos\phi\cos\theta-A\sin\phi\sin\theta\\ &=d_C+A\cos\left(\phi+\theta\right). \end{align*} Therefore, we find that, dd is extremal iff θ=nπϕ\theta=n\pi-\phi (nZn\in\mathbb Z). Then we study what are the features of θ\theta when dd is extremal.

Let θ1arctank1,θ2arctank2.\begin{align*} \theta_1&\coloneqq\arctan k_1,\\ \theta_2&\coloneqq\arctan k_2. \end{align*} Then, we have after some calculations tanθ=1k12+1+1k22+1k1k12+1+k2k22+1=tanθ1+θ2+π2.\tan\theta=-\frac{\frac1{\sqrt{k_1^2+1}}+\frac1{\sqrt{k_2^2+1}}}{\frac{k_1}{\sqrt{k_1^2+1}}+\frac{k_2}{\sqrt{k_2^2+1}}} =\tan\frac{\theta_1+\theta_2+\pi}2. Therefore, θ=nπ+θ1+θ2+π2.\theta=n\pi+\frac{\theta_1+\theta_2+\pi}2. This means that tanθ\tan\theta is the slope of the bisector of the adjacent supplementary angle of O\angle O.

Therefore, we get such a method of construction of PP for extremal d\left\|d\right\|: draw the bisector ll of the adjacent supplementary angle of O\angle O; draw a line passing CC parallel to ll, whose intersection with C\odot C is PP (there are two such intersection points, corresponding to nn being even and odd respectively, and dd takes maximal and minimal values respectively).

Case 2: d1d_1 and d2d_2 have different signs

Now, PP are on different “sides” of l1l_1 and l2l_2, i.e. PP is in the interior of O\angle O or its opposite angle.

Similarly, let dd1d2,d\coloneqq d_1-d_2, and then d\left\|d\right\| is the sum of distances from PP to l1l_1 and l2l_2.

Let dCxC(k1k12+1k2k22+1),d_C\coloneqq x_C\left(\frac{k_1}{\sqrt{k_1^2+1}}-\frac{k_2}{\sqrt{k_2^2+1}}\right), Ar(k1k12+1k2k22+1)2+(1k12+11k22+1)2,A\coloneqq r\sqrt{\left(\frac{k_1}{\sqrt{k_1^2+1}}-\frac{k_2}{\sqrt{k_2^2+1}}\right)^2 +\left(\frac1{\sqrt{k_1^2+1}}-\frac1{\sqrt{k_2^2+1}}\right)^2}, ϕarctan1k12+11k22+1k1k12+1k2k22+1.\phi\coloneqq\arctan\frac{\frac1{\sqrt{k_1^2+1}}-\frac1{\sqrt{k_2^2+1}}}{\frac{k_1}{\sqrt{k_1^2+1}}-\frac{k_2}{\sqrt{k_2^2+1}}}. Then, we have d=dC+Acos ⁣(θ+ϕ).d=d_C+A\cos\!\left(\theta+\phi\right). Therefore, we find that dd is extremal iff θ=nπϕ\theta=n\pi-\phi (nZn\in\mathbb Z). Then we study what are the features of θ\theta when dd is extremal.

Similarly, let θ1arctank1,θ2arctank2.\begin{align*} \theta_1&\coloneqq\arctan k_1,\\ \theta_2&\coloneqq\arctan k_2. \end{align*} Then, we have after some calculations θ=nπ+θ1+θ22.\theta=n\pi+\frac{\theta_1+\theta_2}2. In other words, tanθ\tan\theta is the slope of the bisector of O\angle O.

Therefore, we get such a method of construction of PP for extremal d\left\|d\right\|: draw the bisector ll of O\angle O; draw a line passing CC parallel to ll, whose intersection with C\odot C is PP (there are two such intersection points, corresponding to nn being even and odd respectively, and dd takes maximal and minimal values respectively).

Case 3: d1=0d_1=0 or d2=0d_2=0

In this case, PP is on either l1l_1 or l2l_2.

Without loss of generality, we assume d2=0d_2=0. Then, PP is the intersection of C\odot C and l2l_2, the number of cases is reduced to finite. To avoid confusion, we denote θ\theta now θ0\theta_0. Now, d1d_1 and d2d_2 are functions of θ\theta, while θ0\theta_0 is the θ\theta at which d2=0d_2=0.

Subcase 1: d1=0d_1=0

Obviously, in this case, when θ=θ0\theta=\theta_0, the sum of distances from PP to l1l_1 and l2l_2 takes minimal. This case occurs only when l1,l2,Cl_1,l_2,\odot C intersect at the same point.

Subcase 2: d10d_1\neq 0

Then, according to the property of continuous functions, in some neighborhood of θ0\theta_0, d10d_1\ne0.

Subsubcase 1: C\odot C intersects but is not tangent to l2l_2

Then, in some neighborhood of θ0\theta_0, for the two cases θ<θ0\theta<\theta_0 and θ>θ0\theta>\theta_0, the sign of d2d_2 is different. We can define in this neighborhood d{d1+d2,if d1d2>0,d1,if θ=θ0,d1d2,if d1d2<0.d\coloneqq\begin{cases} d_1+d_2,&\text{if $d_1d_2>0$,}\\ d_1,&\text{if $\theta=\theta_0$,}\\ d_1-d_2,&\text{if $d_1d_2<0$.} \end{cases} It is easy to see that the left and right derivative of the continuous function dd both exist at θ0\theta_0. It can be proved (how?) that, if the two derivatives have different signs, then dd is extremal at θ=θ0\theta=\theta_0.

To examine whether the two derivatives have different signs, we can write the product of them and see whether the result is positive or negative (the case of it being 00 will be discussed later).

Find the derivatives of d1d_1 and d2d_2 respectively. θ1arctank1,θ2arctank2.\begin{align*} \theta_1&\coloneqq\arctan k_1,\\ \theta_2&\coloneqq\arctan k_2. \end{align*} Then, we have dd1dθ=k1rsinθrcosθk2+1=rcos ⁣(θθ1),\begin{align*} \frac{\mathrm dd_1}{\mathrm d\theta} &=\frac{-k_1r\sin\theta-r\cos\theta}{\sqrt{k^2+1}}\\ &=-r\cos\!\left(\theta-\theta_1\right), \end{align*} dd2dθ=rcos ⁣(θθ2).\frac{\mathrm dd_2}{\mathrm d\theta}=-r\cos\!\left(\theta-\theta_2\right). Therefore, the left and right derivatives of dd at θ0\theta_0 are respectively dddθθ=θ0±=dd1dθθ=θ0+dd2dθθ=θ0=rcos ⁣(θ0θ1)rcos ⁣(θ0θ2)=2rcos ⁣(θ0θ1+θ22)cosθ1θ22,\begin{align*} \left.\frac{\mathrm dd}{\mathrm d\theta}\right|_{\theta=\theta_0^\pm} &=\left.\frac{\mathrm dd_1}{\mathrm d\theta}\right|_{\theta=\theta_0} +\left.\frac{\mathrm dd_2}{\mathrm d\theta}\right|_{\theta=\theta_0}\\ &=-r\cos\!\left(\theta_0-\theta_1\right)-r\cos\!\left(\theta_0-\theta_2\right)\\ &=-2r\cos\!\left(\theta_0-\frac{\theta_1+\theta_2}2\right)\cos\frac{\theta_1-\theta_2}2, \end{align*} dddθθ=θ0=2rsin ⁣(θ0θ1+θ22)sinθ1θ22.\left.\frac{\mathrm dd}{\mathrm d\theta}\right|_{\theta=\theta_0^\mp} =-2r\sin\!\left(\theta_0-\frac{\theta_1+\theta_2}2\right)\sin\frac{\theta_1-\theta_2}2. Then, the product of the two derivatives is ν0dddθθ=θ0±dddθθ=θ0=r2sin ⁣(θ1θ2)sin(2(θ0θ1+θ22)).\nu_0\coloneqq \left.\frac{\mathrm dd}{\mathrm d\theta}\right|_{\theta=\theta_0^\pm} \cdot\left.\frac{\mathrm dd}{\mathrm d\theta}\right|_{\theta=\theta_0^\mp} =r^2\sin\!\left(\theta_1-\theta_2\right)\sin\left(2\left(\theta_0-\frac{\theta_1+\theta_2}2\right)\right). According to this equation, we can determine the sign of ν0\nu_0 by merely knowing which quadrant the angle θ0θ1+θ22\theta_0-\frac{\theta_1+\theta_2}2 is in, and can therefore determine whether dd is extremal.

(When ν0=0\nu_0=0, PP is the intersection of the three object: the bisector of O\angle O or its adjacent supplementary angle, C\odot C, and l2l_2. In this case, dd may take extremal or not. How do we discuss this case now?)

Subsubcase 2: C\odot C is tangent to l2l_2

This case is easy. You only need to see whether PP is in the interior of O\angle O or its opposite angle when PP is moving near the tangent point. If it is in the interior, then the case is identical to Case 2; if it is in the exterior, then the case is identical to Case 1.

Summary

We finally got the method of determining whether the point PP on C\odot C has the extremal sum of distances to l1l_1 and l2l_2:

  • If PP is in the interior of O\angle O or its opposite angle (or, PP is on the tangent point of C\odot C and one of the sides of O\angle O while PP is in the interior of O\angle O or its opposite angle when it moves near the tangent point), then we can see whether it is the intersection of C\odot C and the bisector of O\angle O. If it is, then the sum of distances is extremal; if it is not, then the sum of distances is not extremal.
  • If PP is in the interior of an adjacent supplementary angle of O\angle O (or, PP is on the tangent point of C\odot C and one of the sides of O\angle O while PP is in the interior of an adjacent supplementary angle of O\angle O when it moves near the tangent point), then we can see whether it is the intersection of C\odot C and the bisector of the adjacent supplementary angle O\angle O. If it is, then the sum of distances is extremal; if it is not, then the sum of distances is not extremal.
  • If PP is on the intersection of C\odot C and one of the edge l2l_2 of O\angle O, then we can divide the plane into four parts by drawing the bisector of O\angle O and that of the adjacent supplementary angle of O\angle O, call the union of the two divided parts with l2l_2 passing through as D2D_2. Then, translate D2D_2 to make the intersection of its boundary lines overlap with CC, and see whether PP belongs to the translated D2D_2. If it is an interior point of the region, then the sum of distances is extremal; if it is an exterior point of the region, then the sum of distances is not extremal; if it is a boundary point of the region, then the sum of distances may be extremal or not.