Suppose P is a point on the circle ⊙C. When is the sum of distances from P to two edges of ∠O extremal? It turns out to be related to angle bisectors (the intersections of ⊙C and the bisector of ∠O or its adjacent supplementary angle are extremals), while the edge cases (at the intersections of ⊙C and edges of ∠O) are a little tricky: we need to use the bisectors to divide the plane into four quadrants, pick the two quadrants where the line intersecting ⊙C at P lies, translate the region to make it center at C, and see whether P is inside the translated region.
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 P is a point on the circle ⊙C with radius r. Now we study the feature of the position of the point P when the sum of the distances from P to the two edges of ∠O is extremal.
Set up Cartesian plane coordinates with the origin at O and the x-axis pointing from O to C. Suppose the coordinates of C are (xC,0), the coordinates of P is (xC+rcosθ,rsinθ), and the slope of the two sides of ∠O are k1 and k2 respectively. Then, we have l1l2:k1x−y=0,:k2x−y=0.
Suppose d1d2:=k12+1k1(xC+rcosθ)−rsinθ,:=k22+1k2(xC+rcosθ)−rsinθ, and then ∥d1∥ and ∥d2∥ are the distances from P to l1 and l2 respectively. The sum of the distances
∣d∣=∣d1∣+∣d2∣ (the definition of d here are discussed case by case below).
Now, we discuss case by case.
Case 1: d1 and d2 have the same sign
In this case, P is on the same “side” of l1 and l2, i.e. P is in the interior of the adjacent supplementary angle of ∠O.
Suppose d:=d1+d2, and then ∥d∥ is the sum of distances from P to l1 and l2, so we just need to discuss the case when d is extremal.
Let dC:=xC(k12+1k1+k22+1k2),A:=r(k12+1k1+k22+1k2)2+(k12+11+k22+11)2,ϕ:=arctank12+1k1+k22+1k2k12+11+k22+11. Then, we have d=dC+Acosϕcosθ−Asinϕsinθ=dC+Acos(ϕ+θ). Therefore, we find that, d is extremal iff θ=nπ−ϕ (n∈Z). Then we study what are the features of θ when d is extremal.
Let θ1θ2:=arctank1,:=arctank2. Then, we have after some calculations tanθ=−k12+1k1+k22+1k2k12+11+k22+11=tan2θ1+θ2+π. Therefore, θ=nπ+2θ1+θ2+π. This means that tanθ is the slope of the bisector of the adjacent supplementary angle of ∠O.
Therefore, we get such a method of construction of P for extremal ∥d∥: draw the bisector l of the adjacent supplementary angle of ∠O; draw a line passing C parallel to l, whose intersection with ⊙C is P (there are two such intersection points, corresponding to n being even and odd respectively, and d takes maximal and minimal values respectively).
Case 2: d1 and d2 have different signs
Now, P are on different “sides” of l1 and l2, i.e. P is in the interior of ∠O or its opposite angle.
Similarly, let d:=d1−d2, and then ∥d∥ is the sum of distances from P to l1 and l2.
Let dC:=xC(k12+1k1−k22+1k2),A:=r(k12+1k1−k22+1k2)2+(k12+11−k22+11)2,ϕ:=arctank12+1k1−k22+1k2k12+11−k22+11. Then, we have d=dC+Acos(θ+ϕ). Therefore, we find that d is extremal iff θ=nπ−ϕ (n∈Z). Then we study what are the features of θ when d is extremal.
Similarly, let θ1θ2:=arctank1,:=arctank2. Then, we have after some calculations θ=nπ+2θ1+θ2. In other words, tanθ is the slope of the bisector of ∠O.
Therefore, we get such a method of construction of P for extremal ∥d∥: draw the bisector l of ∠O; draw a line passing C parallel to l, whose intersection with ⊙C is P (there are two such intersection points, corresponding to n being even and odd respectively, and d takes maximal and minimal values respectively).
Case 3: d1=0 or d2=0
In this case, P is on either l1 or l2.
Without loss of generality, we assume d2=0. Then, P is the intersection of ⊙C and l2, the number of cases is reduced to finite. To avoid confusion, we denote θ now θ0. Now, d1 and d2 are functions of θ, while θ0 is the θ at which d2=0.
Subcase 1: d1=0
Obviously, in this case, when θ=θ0, the sum of distances from P to l1 and l2 takes minimal. This case occurs only when l1,l2,⊙C intersect at the same point.
Subcase 2: d1=0
Then, according to the property of continuous functions, in some neighborhood of θ0, d1=0.
Subsubcase 1: ⊙C intersects but is not tangent to l2
Then, in some neighborhood of θ0, for the two cases θ<θ0 and θ>θ0, the sign of d2 is different. We can define in this neighborhood d:=⎩⎨⎧d1+d2,d1,d1−d2,if d1d2>0,if θ=θ0,if d1d2<0.
It is easy to see that the left and right derivative of the continuous function d both exist at θ0. It can be proved (how?) that, if the two derivatives have different signs, then d is extremal at θ=θ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 0 will be discussed later).
Find the derivatives of d1 and d2 respectively. θ1θ2:=arctank1,:=arctank2. Then, we have dθdd1=k2+1−k1rsinθ−rcosθ=−rcos(θ−θ1),dθdd2=−rcos(θ−θ2). Therefore, the left and right derivatives of d at θ0 are respectively
dθddθ=θ0±=dθdd1θ=θ0+dθdd2θ=θ0=−rcos(θ0−θ1)−rcos(θ0−θ2)=−2rcos(θ0−2θ1+θ2)cos2θ1−θ2,dθddθ=θ0∓=−2rsin(θ0−2θ1+θ2)sin2θ1−θ2. Then, the product of the two derivatives is ν0:=dθddθ=θ0±⋅dθddθ=θ0∓=r2sin(θ1−θ2)sin(2(θ0−2θ1+θ2)). According to this equation, we can determine the sign of ν0 by merely knowing which quadrant the angle
θ0−2θ1+θ2 is in, and can therefore determine whether d is extremal.
(When ν0=0, P is the intersection of the three object: the bisector of ∠O or its adjacent supplementary angle, ⊙C, and l2. In this case, d may take extremal or not. How do we discuss this case now?)
Subsubcase 2: ⊙C is tangent to l2
This case is easy. You only need to see whether P is in the interior of ∠O or its opposite angle when P 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 P on ⊙C has the extremal sum of distances to l1 and l2:
If P is in the interior of ∠O or its opposite angle (or, P is on the tangent point of ⊙C and one of the sides of ∠O while P is in the interior of ∠O or its opposite angle when it moves near the tangent point), then we can see whether it is the intersection of ⊙C and the bisector of ∠O. If it is, then the sum of distances is extremal; if it is not, then the sum of distances is not extremal.
If P is in the interior of an adjacent supplementary angle of ∠O (or, P is on the tangent point of ⊙C and one of the sides of ∠O while P is in the interior of an adjacent supplementary angle of ∠O when it moves near the tangent point), then we can see whether it is the intersection of ⊙C and the bisector of the adjacent supplementary 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 P is on the intersection of ⊙C and one of the edge l2 of ∠O, then we can divide the plane into four parts by drawing the bisector of ∠O and that of the adjacent supplementary angle of ∠O, call the union of the two divided parts with l2 passing through as D2. Then, translate D2 to make the intersection of its boundary lines overlap with C, and see whether P belongs to the translated D2. 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.