Keywords

1 Introduction

1.1 Problem Definition

We have analytically solved the problem how to split a given triangle’s two sides by a line such that a total area of inscribed two circles embedded in each side of the line reaches the maximum. We also show that Malfatti’s problem for n = 2 is a particular case of our problem.

As in Figure 1, the cutting line l splits the △ABC into two areas. There are two embedded circles O 1 and O 2, respectively, in both areas. The cutting line l has to go through both AB and AC. We denote the radius of circle O 1 as r 1 and the radius of circle O 2 as r 2.

Fig. 1
figure 1

The definition of the problem

The global optimization problem is defined to maximize \(r_1^2 + r_2^2\) subject to all positions of line l.

We call the problem as Enkhbat problem named after the last author, because the split line acts as an auxiliary line to collect the maximum points and leads to simple objective function with regard to the original Malfatti’s problem for n = 2. We will discuss the maximization \(r_1^n + r_2^n (n \geq 1)\), subject to all positions of line l in the next article.

1.1.1 The Problem of Malfatti

In [5], the authors describe the Malfatti’s problem: Given a triangle, to find three non-overlapping circles inside it with total maximum area. This problem is also referred to as Malfatti’s marble problem in [5]. They mentioned Malfatti’s construction problem as well. Malfatti’s construction problem is to construct Malfatti’s arrangement using ruler and compass. Malfatti’s arrangement is that three mutually tangent circles such that each of them is also tangent to two edges of the triangle. In [1], the authors geometrically solved the Malfatti’s problem with two circles. In [6], the authors solved Malfatti’s problem by the greedy algorithm. Also, in [7,8,9], Malfatti’s problem as well as high dimensional Malfatti’s problems were solved by use of global optimization theory and algorithms.

1.1.2 The Special Case of Malfatii’s Problem

In [4] and Appendix, R. Enkhbat formulates the following problem: the cutting line l which goes through A and across BC divides the △ABC into two areas. There are two embedded circles I 1 and I 2, respectively, in both areas. We also denote the radius of circle I 1 as r 1 and the radius of circle I 2 as r 2. The global optimization problem is defined to maximize \(r_1^2 + r_2^2\) . This problem is a special case of our problem which is discussed in this article. Luvsanbyamba Buyankhuu gave an analytic solution of the problem in Appendix using Lagrange multiplier method with an equality constraint.

1.1.3 Optimization Problem of the Inscribed Ball in Polyhedral Set

In [2], R. Enkhbat and B. Barsbold considered the problem for optimal inscribing of two balls into bounded polyhedral set, so that sum of their radii is maximized. The authors formulate this problem as a bilevel programming problem. The gradient based method for solving it has been proposed. In [3], R. Enkhbat and A. Bayarbaatar considered a problem of finding the maximum radius of inscribed ball and minimum radius of circumscribed ball defined over a polyhedral set and proposed some optimization algorithms to solve them. They formulate linear programming model for maximum radius of inscribed ball (from Page 24 of [3] ):

This is a linear programming solution of Chebyshev center of polyhedral set.

2 Problem Formulation

Let us start to formulate the problem.

As shown in Figure 2a, for maximization purpose, the circle O 1 and circle O 2 both should be inscribed (two dashed circles which are all tangent to sides and the lines). Especially inscribed circle O 2 means it is the biggest one and tangent to PT, PB, and BC assuming T is vertically below P.

Fig. 2
figure 2

The formulation. (a) The biggest embedded one is inscribed. (b) Two types of the cutting line

We denote the inradius of △ABC as R, so r 1 ≤ R and r 2 ≤ R are held geometrically.

In Figure 2b, we have the cutting line PT, Point P on AB, and Point T on AC. We build PQʺRTʺBC to have line QR, Point Q on AC, and Point R on AB.

The cutting line has two types:

  1. 1.

    Line PT: for any fixed P, T moves from Q to C, T is always below the P in the vertical direction.

  2. 2.

    Line QR: for any fixed Q, R moves from P to B, R is always below the Q in the vertical direction.

First, we consider only type 1 PT case. Then we will get the result of type 2 QR case in Section 5.

As shown in Figure 3, we can imagine that the circle O 2 is from vertex B to grow away to the end to become the inscribed circle of the △ABC, so r PTCB is from 0 to R (inradius of △ABC). For any fixed r PTCB, tangent line PT of circle O 2 goes around from P 1 T 1 to P 2 T 2.

Fig. 3
figure 3

Solving of Type 1 PT case

3 Solution

3.1 Some Notations

R is inradius of △ABC, r 1 is radius of inscribed circle of △APT and r 2 is radius of inscribed circle of quadrilateral BPTC, \(p = \frac {1}{2}(a+b+c)\) is semiperimeter of the triangle.

$$\displaystyle \begin{aligned} \angle A &= 2\alpha, \angle B = 2\beta , \angle C = 2\gamma (\alpha,\beta,\gamma \in (0,\frac{\pi}{2})) \\ AB &= c , BC = a , AC = b \\ \angle APT &= 2 \theta, \angle BPT = 2 (\frac{\pi}{2}-\theta) \end{aligned} $$

without loss of generality, we assume AC ≤ AB ≤ BC.

3.2 A Few Preliminary Results

The following results come from basic rules of a triangle such as law of sines, Heron’s formula, and feature of half angle of the triangle. We will often use them implicitly or explicitly by reference number later.

(1)
$$\displaystyle \begin{aligned} \frac{R}{asin^2\beta} &= \cot\beta - \tan\alpha \notag \\ {asin^2\beta} &= \frac{R}{\cot\beta - \tan\alpha} \notag \\ 0 &< \alpha < \frac{\pi}{2} , 0 < \beta < \frac{\pi}{2} \notag \\ \cot\alpha &> 0 , \cot\beta > 0 \notag \\ \cot{}(\alpha + \beta) &> 0 ( \alpha + \beta + \gamma = \frac{\pi}{2} \implies \alpha + \beta < \frac{\pi}{2}) \notag \\ \cot\alpha\cot\beta -1 & > 0 ( \cot\alpha\cot\beta -1 = \cot{}(\beta + \alpha) (\cot\beta + \cot\alpha)> 0),\notag\\ &\cot\alpha\cot\gamma -1 > 0 \notag\\ \cot\beta >& \tan\alpha ( \cot\alpha\cot\beta -1 > 0 {\implies} \cot\alpha\cot\beta {>} 1 ), \cot\gamma > \tan\alpha {} \end{aligned} $$
(2)

3.3 Expression of r 1 via r 2

From Figure 4, we have the following results geometrically

$$\displaystyle \begin{gathered} AP = AD + PD = r_1(\cot \alpha + \cot \theta) \\ PE = r_2 \cot{}(\frac{\pi}{2} - \theta) = r_2 \tan \theta = r_2 \frac {1}{\cot \theta} \\ AE = AB - BE = c - r_2 \cot \beta = AP + PE \\ c - r_2 \cot \beta = r_1(\cot \alpha + \cot \theta) + r_2 \frac {1}{\cot \theta} \\ r_1 = \frac {c-r_2 \cot \beta-r_2 \frac {1}{\cot \theta}}{\cot \alpha + \cot \theta} \end{gathered} $$

Let x = r 2 and \( y = \cot \theta \), then we have

$$\displaystyle \begin{aligned} r_1 &= \frac {c-x \cot \beta-x \frac {1}{y}}{\cot \alpha + y} = \frac {cy-xy \cot \beta-x}{y^2 + y\cot \alpha} \\ r_2 &= x (x \in [0,R]) \end{aligned} $$
Fig. 4
figure 4

Express r 1 using r 2 as parameter

Now we can build the objective function of the problem. For further purpose to show the convexity of the objective function, we also need to calculate the partial differentiation of the objective function.

$$\displaystyle \begin{aligned} f(x,y) &= r_1^2 + r_2^2 = (\frac {cy-xy \cot \beta-x}{y^2 + y\cot \alpha})^2 + x^2 \notag \\ {} \frac{\partial f}{\partial x} &= 2 \frac {cy-xy \cot \beta-x}{(y^2 + y\cot \alpha)^2}(-y\cot \beta-1) + 2x \notag \\ {} \frac{\partial^2 f}{\partial x^2} &= 2 \frac{(-y\cot \beta-1)(-y\cot \beta-1)}{(y^2 + y\cot \alpha)^2} +2 = 2 \frac{(y\cot \beta+1)^2}{(y^2 + y\cot \alpha)^2} +2 > 0 {} \end{aligned} $$
(3)

The range of x is known as [0, R]. we show the range of y now.

θ changes continuously when PT goes around circle O2. If PT is parallel to BC , θ = β, so \(y=\cot \theta = \cot \beta \). If T coincides with C as shown in Figure 5:

Fig. 5
figure 5

\(y(\cot \theta )\) goes to one edge position: T duplicates with C

In △PBC

x ∈ [0, R]

$$\displaystyle \begin{aligned} x &= 0 \implies \cot\theta= \frac{a\sin\beta\cos\beta}{a\sin^2\beta} = \cot\beta \notag \\ x &= R \implies \cot\theta = \frac{a\sin\beta\cos\beta -R }{a\sin^2\beta}=\tan\alpha, \text{according}\ \text{to} \mbox{(1)} \notag \end{aligned} $$

\((2) \implies \cot \beta > \tan \alpha \), so \(y=\cot \theta \in [\tan \alpha ,\cot \beta ]\). Figure 6 shows domain of (x, y).

Fig. 6
figure 6

Domain of (x, y) or (t, y)

3.4 Existence of Global Maximum of \(r_1^2 + r_2^2\)

Theorem 1

Domain of (x, y) showed in Figure 6 is convex and compact.

Proof

For any points (x 1, y 1) and (x 2, y 2) of domain of (x, y)

$$\displaystyle \begin{gathered} x_1,x_2 \in [0,R] \ \text{ and} \ y_1,y_2 \in [\frac{a\sin\beta\cos\beta - x}{a\sin^2\beta} , \cot \beta] \notag \\ \text{For }\ \text{any }\ \text{constant}\ \theta \in [0,1] \notag \\ \text{ We}\ \text{denote}\ (\bar{x},\bar{y}) = \theta(x_1,y_1) + (1-\theta)(x_2,y_2) = (\theta x_1 + (1-\theta)x_2,\theta y_1\\ + (1-\theta)y_2)\\ {} [0,R] \ \text{ is }\ \text{convex}\ \implies \bar{x}=\theta x_1 + (1-\theta)x_2 \in [0,R] {} \\ y_1 \geq \frac{a\sin\beta\cos\beta - x_1}{a\sin^2\beta} \text{ and } y_2 \geq \frac{a\sin\beta\cos\beta - x_2}{a\sin^2\beta} \implies \notag \\ \theta y_1 + (1-\theta)y_2 \geq \theta \frac{a\sin\beta\cos\beta - x_1}{a\sin^2\beta} + (1-\theta) \frac{a\sin\beta\cos\beta - x_2}{a\sin^2\beta} \notag \\ =\frac{a\sin\beta\cos\beta + (\theta x_1 + (1-\theta)x_2)}{a\sin^2\beta} = \frac{a\sin\beta\cos\beta + \bar{x}}{a\sin^2\beta} \notag \\ \text{ also } \ y_1 \leq \cot\beta \ \text{ and } \ y_2 \leq \cot\beta \notag \\ \theta y_1 + (1-\theta)y_2 \leq \theta\cot\beta + (1-\theta)\cot\beta = \cot\beta \notag \\ \bar{y} \in [\frac{a\sin\beta\cos\beta - \bar{x}}{a\sin^2\beta} , \cot \beta] {}\\ \mbox{(3.4)} \ \text{and} \ \mbox{(3.4)} \implies (\bar{x},\bar{y}) \in \text{ domain}\ \text{of}\ (x,y) \notag \\ \text{So}\ \text{domain}\ \text{of}\ (x,y) \text{ is}\ \text{convex}\ \notag \\ \notag \\ \text{Domain}\ \text{of}\ (x,y) \ \text{ is }\ \text{closed}\ \text{and}\ \text{bounded}\ \text{in}\ \mathbb{R}^2. \notag \\ \text{According}\ \text{to}\ \text{Heine-Borel}\ \text{theorem}\ \text{the}\ \text{domain}\ \text{of}\ \text{(x,y)}\ \text{is}\ \text{compact.}\notag \\ \end{gathered} $$

According to Weierstrass extreme value theorem and continuity of the objective function \(f(x,y)=r_1^2 + r_2^2\), we have

Theorem 2

\(r_1^2 + r_2^2\) reach its global maximum in domain of (x,y), showed in Figure 6.

3.5 Green Candidate and Red Candidate

According to (3), f(x, y) is convex about x, it reaches its maximum at the edge of x. In Figure 6, we can observe, for any fixed y, \(T_1^{\prime }\) and \(T_2^{\prime }\) are the edge points of x, so f(x, y) will reach its maximum on green line and red line.

In Section 4, we will show that one point on green line and another point on red line together make the global maximum point set of f(x, y). We call the two points as green candidate (or GC) and red candidate (or RC) of the global maximum point set of f(x, y). Before we calculate the GC and RC in Section 4, we use the following theorem to show that the GC and RC are both in the domain of f(x, y), because the middle results are useful in Section 4.

Also because we are considering the type 1 PT case , we use GCPT and RCPT notations.

Theorem 3

GC PT: \((R\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1}, \sqrt {\frac {\cot \beta }{\cot \alpha }})\) ,RC PT: \((R,\tan \alpha + \sec \alpha )\) are both in domain of (x,y) showed in Figure 6.

Proof

First we prove \((R\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1}, \sqrt {\frac {\cot \beta }{\cot \alpha }})\) in domain of (x,y)

$$\displaystyle \begin{aligned} \begin{array}{rcl} y &\displaystyle =&\displaystyle \sqrt{\frac{\cot\beta}{\cot\alpha}} = \sqrt{\cot\beta\tan\alpha}\\ y &\displaystyle =&\displaystyle \frac{a\sin\beta\cos\beta - x}{a\sin^2\beta} \implies \notag \\ x &\displaystyle =&\displaystyle asin^2\beta(\cot\beta - \sqrt{\cot\beta\tan\alpha}) = R\frac{\cot\beta - \sqrt{\cot\beta\tan\alpha}}{\cot\beta - \tan\alpha} \notag \\ &\displaystyle =&\displaystyle R\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1} = R\frac{1 - \sqrt{\frac{1}{\cot\beta\cot\alpha}}}{1 - \frac{1}{\cot\beta\cot\alpha}} \notag \\ \frac{1}{\cot\beta\cot\alpha} &\displaystyle =&\displaystyle \frac{R^2}{(p-b)(p-a)} = \frac{pR^2}{p(p-b)(p-a)} = \frac{p-c}{p} \notag \\ x &\displaystyle =&\displaystyle R\frac{1 - \sqrt{\frac{p-c}{p}}}{1-\frac{p-c}{p}} = R\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1} \implies \\ &\displaystyle &\displaystyle \left(R\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1}, \sqrt{\frac{\cot\beta}{\cot\alpha}}\right) \text{ on}\ \text{the}\ \text{line}\ \\ y &\displaystyle =&\displaystyle \frac{a\sin\beta\cos\beta - x}{a\sin^2\beta}\\ &\displaystyle &\displaystyle \text{ It}\ \text{is}\ \text{suffice}\ \text{to}\ \text{show}\ y \in [\tan\alpha,\cot\beta] \notag \\ &\displaystyle &\displaystyle \tan^2\alpha < \cot\beta\tan\alpha <\cot^2\beta , y^2 = \cot\beta\tan\alpha, y>0 \implies \notag \\ &\displaystyle &\displaystyle y \in [\tan\alpha,\cot\beta] \end{array} \end{aligned} $$

Figure 6 showed, \(x = R \implies y\in [\tan \alpha ,\cot \alpha ]\), so we just need to prove \(\tan \alpha + \sec \alpha \in [\tan \alpha ,\cot \alpha ]\)

$$\displaystyle \begin{aligned} \begin{array}{rcl} &\displaystyle &\displaystyle \tan\alpha + \sec\alpha > \tan\alpha ( \sec\alpha > 0) \notag\\ &\displaystyle &\displaystyle \text{We}\ \text{have}\ \text{an}\ \text{auxiliary}\ \text{function } \notag \\ g(y) &\displaystyle =&\displaystyle y^2 - 2y\tan\alpha -1 \notag\\ g(\tan\alpha + \sec\alpha) &\displaystyle =&\displaystyle (\tan\alpha + \sec\alpha)^2 -2(\tan\alpha + \sec\alpha)\tan\alpha - 1\notag \\ &\displaystyle =&\displaystyle \tan^2\alpha + 2 \tan\alpha\sec\alpha + \sec^2\alpha - 2\tan^2\alpha - 2\tan\alpha\sec\alpha -1 \notag \\ &\displaystyle =&\displaystyle \sec^2\alpha-\tan^2\alpha -1=0 \notag\\ g(\cot\beta)&\displaystyle =&\displaystyle cot^2\beta - 2\tan\alpha\cot\beta - 1\notag \\ &\displaystyle =&\displaystyle \frac{(p-b)^2}{R^2} - 2 \frac{R}{p-a} \frac{p-b}{R} - 1\\ &\displaystyle =&\displaystyle \frac{(p-b)^2}{\frac{(p-a)(p-b)(p-c)}{p}} - 2 \frac{p-b}{p-a} - 1\notag \\ &\displaystyle =&\displaystyle \frac{p(p-b)}{(p-a)(p-c)} - 2 \frac{(p-b)(p-c)}{(p-a)(p-c)} - \frac{(p-a)(p-c)}{(p-a)(p-c)} \notag \\ &\displaystyle =&\displaystyle \frac{p^2-bp -2p^2 + 2bp + 2cp - 2bc -p^2 + ap +cp -ac }{(p-a)(p-c)}\notag \\ &\displaystyle =&\displaystyle \frac{-2p^2 + bp + ap +cp + 2cp - 2bc -ac }{(p-a)(p-c)}\\ &\displaystyle =&\displaystyle \frac{-2p^2 + (a+b+c)p + 2p\cdot c - 2bc -ac }{(p-a)(p-c)}\notag \\ &\displaystyle =&\displaystyle \frac{-2p^2 + 2p^2 + c(a+b+c) - 2bc -ac }{(p-a)(p-c)}\\ &\displaystyle =&\displaystyle \frac{ac + bc +c^2 - 2bc -ac }{(p-a)(p-c)}\notag \\ &\displaystyle =&\displaystyle \frac{c^2 - bc}{(p-a)(p-c)} = \frac{c(c-b)}{(p-a)(p-c)} \geq 0 ( c \geq b) \notag \\ &\displaystyle &\displaystyle g \ (y) \ \text{ increase }\ \text{in } \ [\tan\alpha,+\infty),g \ (\tan\alpha + \sec\alpha)=0,\\ &\displaystyle &\displaystyle g \ (\cot\beta) \geq 0 \implies \tan\alpha + \sec\alpha \leq \cot\beta \notag \end{array} \end{aligned} $$

4 Maximum of \(r_1^2 + r_2^2\) Type 1 PT Case

We denote \(t=\frac {x}{R}\) and show that r 1 and r 2 are functions of variables t and y.

$$\displaystyle \begin{aligned} x & \in [0,R] \implies t \in [0,1] \\ \tan&\alpha \leq y \leq \cot\beta \\ r_2 &= x = tR \\ r_1 &= \frac {cy-xy \cot \beta-x}{y^2 + y\cot \alpha} = \frac {cy-tRy \cot \beta-tR}{y^2 + y\cot \alpha} \notag \\ &= \frac {(R\cot\alpha + R\cot\beta)y-tRy \cot \beta-tR}{y^2 + y\cot \alpha} = \frac {y\cot\alpha + y\cot\beta- ty\cot \beta-t}{y^2 + y\cot \alpha} R \\ &\frac{a\sin\beta\cos\beta - x}{a\sin^2\beta} = \frac{a\sin\beta\cos\beta - tR}{a\sin^2\beta} \notag \\&= \cot\beta -t\frac{R}{a\sin^2\beta} = \cot\beta -t(\cot\beta - \tan\alpha) \implies \notag \\ &\cot\beta -t(\cot\beta - \tan\alpha) \leq y \leq \cot \beta \implies \notag \\ & \frac{\cot\beta - y}{\cot\beta - \tan\alpha} \leq t \leq 1 \end{aligned} $$

Because \(r_1^2 + r_2^2 = R^2 Q(t,y)\), we have objective function as Q(t, y)

$$\displaystyle \begin{aligned} Q(t,y) &= (\frac {y\cot\alpha + y\cot\beta- ty\cot \beta-t}{y^2 + y\cot \alpha})^2 + t^2 \\ \frac{\partial Q}{\partial t} &= 2 \frac {y\cot\alpha + y\cot\beta- ty\cot \beta-t}{(y^2 + y\cot \alpha)^2}(-y\cot \beta-1) + 2t \\ \frac{\partial^2 Q}{\partial t^2} &= 2 \frac{(-y\cot \beta-1)(-y\cot \beta-1)}{(y^2 + y\cot \alpha)^2} +2 = 2 \frac{(y\cot \beta+1)^2}{(y^2 + y\cot \alpha)^2} +2 > 0 \end{aligned} $$

\(\frac {\partial ^2 Q}{\partial t^2} > 0 \) means Q(t,y) is convex about parameter t, so for every fixed y,\( Max Q(t,y) = Max \{Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y), Q(1,y)\}\). When y goes through \([\tan \alpha ,\cot \beta ],\) we also have \(Max Q(t,y) = Max \{Max\ Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y), Max\ Q\) (1, y)}.

Geometrically \(Max\ Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y)\) will be searched on the green line of the domain and Max Q(1, y)} will be searched on the red line of the domain.

4.1 \(Max\ Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y)\): Searching on the Green Line of the Domain

We denote \(T(y) = Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y) \)

\(y \in [\tan \alpha , \cot \beta ] \implies Max\ T(y) = Max\{T(\tan \alpha ), T(\cot \beta ), T(\frac {d T}{d y} =0)\}\)

$$\displaystyle \begin{aligned} &\frac {y\cot\alpha + y\cot\beta- ty\cot \beta-t}{y^2 + y\cot \alpha} \notag \\&= \frac {y\cot\alpha + y\cot\beta- (\frac{\cot\beta - y}{\cot\beta - \tan\alpha})y\cot \beta-\frac{\cot\beta - y}{\cot\beta - \tan\alpha}}{y^2 + y\cot \alpha} \notag \\ &=\frac{y\cot\beta\cot\alpha - y + y \cot^2\beta -y\cot\beta\tan\alpha - y\cot^2\beta + y^2\cot\beta - \cot\beta + y}{(y^2 + y\cot \alpha)(\cot\beta - \tan\alpha)} \notag \\ &=\frac{y\cot\beta\cot\alpha -y\cot\beta\tan\alpha + y^2\cot\beta - \cot\beta }{(y^2 + y\cot \alpha)(\cot\beta - \tan\alpha)} \notag \\ &=\frac{y\cot\beta(y +\cot\alpha) -\cot\beta\tan\alpha(y + \cot\alpha) }{y(y + \cot \alpha)(\cot\beta - \tan\alpha)} \notag \\&= \frac{y\cot\beta -\cot\beta\tan\alpha}{y(\cot\beta - \tan\alpha)} \\ &T(y) = [\frac{y\cot\beta -\cot\beta\tan\alpha}{y(\cot\beta - \tan\alpha)}]^2 + (\frac{\cot\beta - y}{\cot\beta - \tan\alpha})^2 \notag \\ &=(\frac{\cot\beta\cot\alpha -\frac{\cot\beta}{y}}{\cot\beta\cot\alpha - 1})^2 + (\frac{\cot\beta\cot\alpha - y\cot\alpha}{\cot\beta\cot\alpha - 1})^2 \notag \\ &=\frac{1}{(\cot\beta\cot\alpha - 1)^2}[(\cot\beta\cot\alpha -\frac{\cot\beta}{y})^2+(\cot\beta\cot\alpha - y\cot\alpha)^2] \\ &T(\tan\alpha) = \frac{1}{(\cot\beta\cot\alpha - 1)^2}[(\cot\beta\cot\alpha -\frac{\cot\beta}{\tan\alpha})^2+(\cot\beta\cot\alpha - \tan\alpha\cot\alpha)^2] = 1 \\ &T(\cot\beta) = (\frac{1}{\cot\beta\cot\alpha - 1})^2[(\cot\beta\cot\alpha -\frac{\cot\beta}{\cot\beta})^2+(\cot\beta\cot\alpha - \cot\beta\cot\alpha)^2] = 1 \\ &\frac{d T}{d y } = 0 \notag \\ &\implies 2(\cot\beta\cot\alpha -\frac{\cot\beta}{y})\frac{\cot\beta}{y^2} + 2(\cot\beta\cot\alpha - y\cot\alpha)(-\cot\alpha) = 0 \notag \\ &\implies \cot^2\beta\cot\alpha\frac{1}{y^2} -\frac{\cot^2\beta}{y^3} - \cot\beta\cot^2\alpha + y\cot^2\alpha = 0 \notag \\ &\implies \cot\beta\cot\alpha\frac{1}{y^2}(\cot\beta - y^2\cot\alpha) -\frac{1}{y^3}(\cot^2\beta - y^4\cot^2\alpha) = 0 \notag \\ &\implies \cot\beta\cot\alpha\frac{1}{y^2}(\cot\beta - y^2\cot\alpha) -\frac{1}{y^3}(\cot\beta - y^2\cot\alpha)(\cot\beta + y^2\cot\alpha) = 0 \notag \\ &\implies (\cot\beta - y^2\cot\alpha) \frac{1}{y^3}(y\cot\beta\cot\alpha - \cot\beta - y^2\cot\alpha) = 0 \end{aligned} $$

\( \frac {1}{y^3} > 0 \\ \cot \beta - y^2\cot \alpha = 0\) or \(y\cot \beta \cot \alpha - \cot \beta - y^2\cot \alpha = 0\)

$$\displaystyle \begin{aligned} \cot\beta - y^2\cot\alpha &= 0 \notag \\ & \implies y= \sqrt{\frac{\cot\beta}{\cot\alpha}} \notag \\ & y\cot\beta\cot\alpha - \cot\beta - y^2\cot\alpha = 0\notag \\ & \implies \cot\beta\cot\alpha - \frac{\cot\beta}{y} = y\cot\alpha \text{ and } \\ &y^2\cot\alpha -y\cot\beta\cot\alpha = - \cot\beta \notag \\ & T(y) = \frac{1}{(\cot\beta\cot\alpha - 1)^2}[(\cot\beta\cot\alpha -\frac{\cot\beta}{y})^2\\ &+(\cot\beta\cot\alpha - y\cot\alpha)^2] \notag \\ &= \frac{1}{(\cot\beta\cot\alpha - 1)^2} (2y^2\cot^2\alpha -2y\cot^2\alpha\cot\beta\\ & +\cot^2\beta\cot^2\alpha ) \notag \\ &= \frac{1}{(\cot\beta\cot\alpha - 1)^2} [2\cot\alpha(y^2\cot\alpha -y\cot\alpha\cot\beta)\\ & +\cot^2\beta\cot^2\alpha ] \notag \\ &= \frac{\cot^2\beta\cot^2\alpha - 2\cot\beta\cot\alpha}{(\cot\beta\cot\alpha - 1)^2} < 1 \notag \\ Max\ T(y) &= Max\{T(\tan\alpha), T(\cot\beta), T(\frac{d T}{d y} =0)\}\\ & = Max \{1,T( \sqrt{\frac{\cot\beta}{\cot\alpha}})\} \implies \notag \\ Max\ &Q(\frac{\cot\beta - y}{\cot\beta - \tan\alpha},y) \\ &= Max \{1,2(\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1})^2\} \notag \end{aligned} $$

4.2 Max Q(1, y): Searching on the Red Line of the Domain

We denote S(y) = Q(1, y)

\(y \in [\tan \alpha , \cot \beta ] \implies Max\ S(y) = Max\{S(\tan \alpha ), S(\cot \beta ), S(\frac {d S}{d y} =0)\}\)

$$\displaystyle \begin{aligned} S(y) &= (\frac{y\cot\alpha -1}{y^2 + y\cot\alpha})^2 + 1 \\ &S(\tan\alpha) = 1 \\ &S(\cot\beta) = (\frac{\cot\beta\cot\alpha -1}{\cot^2\beta + \cot\beta\cot\alpha})^2 + 1 > S(\tan\alpha) \\ \frac{dS}{dy} &= 0 \notag \\ &\implies (\frac{y\cot\alpha -1}{y^2 + y\cot\alpha})[\frac{y^2\cot\alpha+y\cot^2\alpha-(y\cot\alpha-1)(2y+\cot\alpha)}{(y^2 + y\cot\alpha)^2}] = 0 \notag \\ &\implies (\frac{y\cot\alpha -1}{y^2 + y\cot\alpha})[\frac{-y^2\cot\alpha+2y+\cot\alpha)}{(y^2 + y\cot\alpha)^2}] = 0 \end{aligned} $$

\(y\cot \alpha -1 =0 \implies y = \tan \alpha \) is already calculated Let us calculate \(-y^2\cot \alpha +2y+\cot \alpha = 0\)

$$\displaystyle \begin{aligned} &-y^2\cot\alpha+2y+\cot\alpha = 0 \implies y^2 -2y\tan\alpha -1\notag \\ & = 0 \implies y = \tan\alpha + \sec\alpha \notag \\ \frac {y\cot\alpha- 1}{y^2 + y\cot \alpha} &= \frac{(\tan\alpha + \sec\alpha)\cot\alpha- 1}{(\tan\alpha + \sec\alpha)^2 + (\tan\alpha + \sec\alpha)\cot \alpha}\notag \\ & = \frac{\sec\alpha\cot\alpha}{\tan^2\alpha + \sec^2\alpha + 2\sec\alpha\tan\alpha + 1 + \sec\alpha\cot \alpha} \notag \\ &= \frac{\sec\alpha\cot\alpha}{2\sec^2\alpha + 2\sec\alpha\tan\alpha + \sec\alpha\cot \alpha}\notag \\ & = \frac{1}{2\sec\alpha\tan\alpha + 2\tan^2\alpha + 1} \notag \\ & = \frac{1}{2\sec\alpha\tan\alpha + \tan^2\alpha + \sec\alpha} \notag \\ & = \frac{\sec^2\alpha-\tan^2\alpha}{(\sec\alpha+\tan\alpha)^2}\notag \\ & = \frac{\sec\alpha-\tan\alpha)}{\sec\alpha+\tan\alpha}{}\\ S(\tan\alpha + \sec\alpha) &= (\frac{\sec\alpha - \tan\alpha}{\sec\alpha + \tan\alpha})^2 + 1 \notag \\ & Theorem~\mbox{3} \implies \tan\alpha + \sec\alpha \leq \cot\beta \notag \\ &\text{ in } \ [\tan\alpha + \sec\alpha,\cot\beta] \text{,} y\cot\alpha -1 > 0, y^2 + y\cot\alpha > 0,\notag\\ & -y^2\cot\alpha+2y+\cot\alpha \leq 0 \notag\\ & \frac{dS}{dy}(y) = (\frac{\cot\beta\cot\alpha -1}{y^2 + y\cot\alpha})[\frac{-y^2\cot\alpha+2y+\cot\alpha)}{(y^2 + y\cot\alpha)^2}] \leq 0 \notag \end{aligned} $$
(4)

S(y) does not increase in \( [\tan \alpha + \sec \alpha ,\cot \beta ] \implies S(\cot \beta ) \leq S(\tan \alpha + \sec \alpha )\)

\(Max\ S(y) = S(\tan \alpha + \sec \alpha ) \)

\( \\ Max\ Q(1,\tan \alpha + \sec \alpha ) = S(\tan \alpha + \sec \alpha )\)

4.3 \(Max(r_1^2 + r_2^2)\) in Type 1 PT Case

We can combine the above two results as

\(\\Max Q(t,y) = Max \{Max\ Q(\frac {\cot \beta - y}{\cot \beta - \tan \alpha },y), Max\ Q(1,y)\} \)

\(= Max \{1,2(\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1})^2, Q(1,\tan \alpha + \sec \alpha )\}\)

Because \(Q(1,\tan \alpha + \sec \alpha )\} = S(\tan \alpha + \sec \alpha ) \geq S(\cot \beta ) \geq S(\tan \alpha )=1\)

Therefore \(Max Q(t,y) = Max \{2(\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1\}\)

And so, \(Max(r_1^2 + r_2^2) = Max \{2(\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1\}R^2 \)

5 Maximum of \(r_1^2 + r_2^2\) Type 2 QR Case

We just need to exchange b and c , exchange γ and β in all formula in Section 4, for example,

$$\displaystyle \begin{aligned} f(x,y) &= r_1^2 + r_2^2 = (\frac {by-xy \cot \gamma-x}{y^2 + y\cot \alpha})^2 + x^2 \end{aligned} $$

Because the relation c ≥ b is not symmetrical , we have

$$\displaystyle \begin{aligned} g(\cot\gamma)&=cot^2\gamma - 2\tan\alpha\cot\gamma - 1 \notag \\ &= \frac{(p-c)^2}{R^2} - 2 \frac{R}{p-a} \frac{p-c}{R} - 1 = \frac{(p-c)^2}{\frac{(p-a)(p-b)(p-c)}{p}} - 2 \frac{p-c}{p-a} - 1 \notag \\ & = \frac{p(p-c)}{(p-a)(p-b)} - 2 \frac{(p-b)(p-c)}{(p-a)(p-b)} - \frac{(p-a)(p-b)}{(p-a)(p-b)} \notag \\ &= \frac{p^2-cp -2p^2 + 2cp + 2bp - 2bc -p^2 + ap +bp -ab }{(p-a)(p-b)} \notag \\ &= \frac{-2p^2 + bp + ap +cp + 2bp - 2bc -ab }{(p-a)(p-b)}\notag\\ & = \frac{-2p^2 + (a+b+c)p + 2p\cdot b - 2bc -ab }{(p-a)(p-b)} \notag \\ &= \frac{-2p^2 + 2p^2 + b(a+b+c) - 2bc -ab }{(p-a)(p-b)} \notag\\ &= \frac{ab + bc +b^2 - 2bc -ab }{(p-a)(p-b)} \notag \\ &= \frac{b^2 - bc}{(p-a)(p-b)} = \frac{b(b-c)}{(p-a)(p-b)} \leq 0 ( c \geq b) \notag \\ &g(y) \ \text{ increase }\ \text{in } \ [\tan\alpha,{+}\infty),g \ (\tan\alpha {+} \sec\alpha){=}0,g \ (\cot\gamma) \leq 0 \implies \notag \\ \tan\alpha + \sec\alpha &\geq \cot\gamma \notag \end{aligned} $$

\(\tan \alpha + \sec \alpha \) beyond \([\tan \alpha ,\cot \gamma ]\), so RCQR become \((R,\cot \gamma )\), we have the following theorem in type 2 QR case.

Theorem 4

GC QR: \((R\frac {\cot \gamma \cot \alpha - \sqrt {\cot \gamma \cot \alpha }}{\cot \gamma \cot \alpha - 1}, \sqrt {\frac {\cot \gamma }{\cot \alpha }})\) ,RC QR: \((R,\cot \gamma )\) are both in the domain of (x,y)

6 Maximum of \(r_1^2 + r_2^2\)

The candidate point set are {GCPT,RCPT,GCQR,RCQR}.

\(r_1^2 + r_2^2\) is geometrically the same at RCQR: \((R,\cot \gamma )\) point and at \((R,\cot \beta ))\) of type 1 PT case, so less than \(r_1^2 + r_2^2\) at RCPT: \((R,\tan \alpha + \sec \alpha ).\)

The candidate point set becomes {GCPT,RCPT,GCQR}.

$$\displaystyle \begin{aligned} \begin{array}{rcl} Max(r_1^2 + r_2^2)&\displaystyle =&\displaystyle Max \{2(\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1})^2, (\frac{\sec\alpha - \tan\alpha}{\sec\alpha + \tan\alpha})^2 \\ &\displaystyle &\displaystyle + 1, 2(\frac{\cot\gamma\cot\alpha - \sqrt{\cot\gamma\cot\alpha}}{\cot\gamma\cot\alpha - 1})^2\}R^2 \end{array} \end{aligned} $$
$$\displaystyle \begin{aligned} \begin{array}{rcl} &\displaystyle &\displaystyle \frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1} \\ &\displaystyle &\displaystyle = \frac{\sqrt{\cot\beta\cot\alpha}(\sqrt{\cot\beta\cot\alpha} - 1)}{(\sqrt{\cot\beta\cot\alpha} + 1)(\sqrt{\cot\beta\cot\alpha} - 1)}\\ &\displaystyle &\displaystyle = \frac{\sqrt{\cot\beta\cot\alpha}}{\sqrt{\cot\beta\cot\alpha} + 1} = \notag \\ &\displaystyle &\displaystyle \frac{1}{1+\sqrt{\tan\beta\tan\alpha}} > \frac{1}{1+\sqrt{\tan\gamma\tan\alpha}} ( \beta < \gamma) {} \\ &\displaystyle &\displaystyle \text{also,} \frac{\cot\gamma\cot\alpha - \sqrt{\cot\gamma\cot\alpha}}{\cot\gamma\cot\alpha - 1} \\ &\displaystyle &\displaystyle = \frac{\sqrt{\cot\gamma\cot\alpha}(\sqrt{\cot\gamma\cot\alpha} - 1)}{(\sqrt{\cot\gamma\cot\alpha} + 1)(\sqrt{\cot\gamma\cot\alpha} - 1)}\\ &\displaystyle &\displaystyle = \frac{\sqrt{\cot\gamma\cot\alpha}}{\sqrt{\cot\gamma\cot\alpha} + 1} = \frac{1}{1+\sqrt{\tan\gamma\tan\alpha}} \notag \\ &\displaystyle &\displaystyle 2(\frac{\cot\beta\cot\alpha - \sqrt{\cot\beta\cot\alpha}}{\cot\beta\cot\alpha - 1})^2 \\ &\displaystyle &\displaystyle > 2(\frac{\cot\gamma\cot\alpha - \sqrt{\cot\gamma\cot\alpha}}{\cot\gamma\cot\alpha - 1})^2 \notag \end{array} \end{aligned} $$
(5)

The candidate point set becomes {GCPT,RCPT}.

\(Max(r_1^2 + r_2^2) = Max \{2(\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1\}R^2 \)

we have the following theorem about Max(\(r_1^2 + r_2^2\))

Theorem 5

When the cutting line goes through AB, AC sides the \(r_1^2 + r_2^2\) reach its maximum at \((R\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1}, \sqrt {\frac {\cot \beta }{\cot \alpha }})\) or \((R,\tan \alpha + \sec \alpha )\) , the maximum value is \(2(\frac {\cot \beta \cot \alpha - \sqrt {\cot \beta \cot \alpha }}{\cot \beta \cot \alpha - 1})^2R^2\) or \([(\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2+1]R^2\) , respectively.

7 Proof of Malfatti’s Problem for n = 2

7.1 The Cutting Line Goes Through All Three Sides of the Triangle

If the cutting line goes through AB, AC, andBC, according to Theorem 5 and (5) we have

\( Max(r_1^2 + r_2^2) = Max \{2(\frac {1}{1+\sqrt {\tan \beta \tan \alpha }})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1, 2(\frac {1}{1+\sqrt {\tan \beta \tan \gamma }})^2,\) \((\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2 + 1,2(\frac {1}{1+\sqrt {\tan \beta \tan \gamma }})^2, (\frac {\sec \gamma - \tan \gamma }{\sec \gamma + \tan \gamma })^2 + 1\}R^2 \)

BC is the long one, the \(2(\frac {1}{1+\sqrt {\tan \beta \tan \gamma }})^2\) duplicate we have

\( Max(r_1^2 + r_2^2) = Max \{2(\frac {1}{1+\sqrt {\tan \beta \tan \alpha }})^2, 2(\frac {1}{1+\sqrt {\tan \beta \tan \gamma }})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1, (\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2 + 1, (\frac {\sec \gamma - \tan \gamma }{\sec \gamma + \tan \gamma })^2 + 1\}R^2\)

and α ≥ γ, we get

\( Max(r_1^2 + r_2^2) = Max \{2(\frac {1}{1+\sqrt {\tan \beta \tan \gamma }})^2, (\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1, (\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2 + 1, (\frac {\sec \gamma - \tan \gamma }{\sec \gamma + \tan \gamma })^2 + 1\}R^2\)

$$\displaystyle \begin{aligned} (\frac{\sec\beta - \tan\beta}{\sec\beta + \tan\beta})^2 + 1 = (\frac{1 - \sin\beta}{1 + \sin\beta})^2 + 1 = \frac{2(1 + \sin^2\beta)}{(1 + \sin\beta)^2} {} \end{aligned} $$
(6)
$$\displaystyle \begin{aligned} (\frac{\sec\gamma - \tan\gamma}{\sec\gamma + \tan\gamma})^2 + 1 = (\frac{1 - \sin\gamma}{1 + \sin\gamma})^2 + 1 = \frac{2(1 + \sin^2\gamma)}{(1 + \sin\gamma)^2} {} \end{aligned} $$
(7)

if \(\beta \leq \gamma \implies \tan \beta \leq \sqrt {\tan \beta \tan \gamma } \)

$$\displaystyle \begin{aligned} 2(\frac{1}{1+\sqrt{\tan\beta\tan\gamma}})^2= \frac{2}{(1+\sqrt{\tan\beta\tan\gamma})^2} < \frac{2(1 + \sin^2\beta)}{(1+\sqrt{\tan\beta\tan\gamma})^2} \notag \\ \leq \frac{2(1 + \sin^2\beta)}{(1+ \tan\beta)^2} < \frac{2(1 + \sin^2\beta)}{(1+ \sin\beta)^2} \notag \\ \mbox{(6)} \implies 2(\frac{1}{1+\sqrt{\tan\beta\tan\gamma}})^2 < (\frac{\sec\beta - \tan\beta}{\sec\beta + \tan\beta})^2 + 1 {} \end{aligned} $$
(8)

And if \(\beta > \gamma \implies \tan \gamma < \sqrt {\tan \beta \tan \gamma } \)

$$\displaystyle \begin{aligned} 2(\frac{1}{1+\sqrt{\tan\beta\tan\gamma}})^2= \frac{2}{(1+\sqrt{\tan\beta\tan\gamma})^2} < \frac{2(1 + \sin^2\gamma)}{(1+\sqrt{\tan\beta\tan\gamma})^2} \notag \\ \leq \frac{2(1 + \sin^2\gamma)}{(1+ \tan\gamma)^2} < \frac{2(1 + \sin^2\gamma)}{(1+ \sin\gamma)^2} \notag \\ \mbox{(7)} \implies 2(\frac{1}{1+\sqrt{\tan\beta\tan\gamma}})^2 < (\frac{\sec\gamma - \tan\gamma}{\sec\gamma + \tan\gamma})^2 + 1 {} \end{aligned} $$
(9)

\( Max(r_1^2 + r_2^2) = Max \{(\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2 + 1, (\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2 + 1, (\frac {\sec \gamma - \tan \gamma }{\sec \gamma + \tan \gamma })^2 + 1\}R^2\)

From (8) and (9), we have

Theorem 6

When the cutting line goes through AB, AC, and BC sides, the \(r_1^2 + r_2^2\) reach its maximum at \((R,\tan \alpha + \sec \alpha )\) or \((R,\tan \beta + \sec \beta )\) or \((R,\tan \gamma + \sec \gamma )\) , the maximum value is \([(\frac {\sec \alpha - \tan \alpha }{\sec \alpha + \tan \alpha })^2+1]R^2\) or \([(\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2+1]R^2\) or \([(\frac {\sec \gamma - \tan \gamma }{\sec \gamma + \tan \gamma })^2+1]R^2\) , respectively.

$$\displaystyle \begin{aligned} (\frac{\sec\alpha - \tan\alpha}{\sec\alpha + \tan\alpha})^2 + 1 = (\frac{1 - \sin\alpha}{1 + \sin\alpha})^2 + 1 = [\frac{(1 - \sin\alpha)^2}{1 - \sin^2\alpha}]^2\notag\\ + 1 = (\frac{1 - \sin\alpha}{\cos\alpha})^4 +1 = [\tan{}(\frac{\pi}{4}-\frac{\alpha}{2})]^4 +1 \notag \end{aligned} $$

We have assumed α ≥ γ ≥ β , so

\( [\tan {}(\frac {\pi }{4}-\frac {\alpha }{2})]^4 +1 \leq [\tan {}(\frac {\pi }{4}-\frac {\gamma }{2})]^4 +1 \leq [\tan {}(\frac {\pi }{4}-\frac {\beta }{2})]^4 +1 \)

and we have \( Max(r_1^2 + r_2^2) = (\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2R^2\)

Finally, we have

Theorem 7

When the cutting line goes through AB, AC, and BC sides, if β is smallest half angle ofABC , the \(r_1^2 + r_2^2\) reach its maximum at \((R,\tan \beta + \sec \beta )\) , the maximum value is \([(\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2+1]R^2\).

7.2 Malfatti n = 2 Problem as Corollary

Theorem 8

At \((R,\tan \alpha + \sec \alpha )\) point, r 1 and r 2 go to tangent position.

Proof

we just need to proof |O 1 O 2| = r 1 + r 2

$$\displaystyle \begin{aligned} r_1 &= \frac {cy-xy \cot \beta-x}{y^2 + y\cot \alpha} = \frac {R(\cot\alpha+\cot\beta)y - Ry \cot\beta - R}{y^2 + y\cot \alpha} \notag \\ &= \frac {Ry\cot\alpha- R}{y^2 + y\cot \alpha} = R\frac {y\cot\alpha- 1}{y^2 + y\cot \alpha}\\ \mbox{(4)} \implies \frac {y\cot\alpha- 1}{y^2 + y\cot \alpha} &= \frac{\sec\alpha-\tan\alpha}{\sec\alpha+\tan\alpha} \\ & = \frac{1-\sin\alpha}{1+\sin\alpha} \\ r_1 + r_2 &= R(1+\frac{1-\sin\alpha}{1+\sin\alpha}) \notag \\ &= R\frac{2}{1+\sin\alpha}\end{aligned} $$
$$\displaystyle \begin{aligned} (\frac{r_1}{\sin\theta})^2 + (\frac{r_2}{\cos\theta})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{cy-xy\cot\beta-x}{(y^2 + y\cot\alpha)\sin\theta})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{R(\cot\alpha+\cot\beta)y-Ry\cot\beta-R}{(y^2 + y\cot\alpha)\sin\theta})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{R}{\sin\theta})^2(\frac{y\cot\alpha-1}{y^2 + y\cot\alpha})^2 \\ \mbox{(4)} \implies (\frac{r_1}{\sin\theta})^2 + (\frac{r_2}{\cos\theta})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{R}{\sin\theta})^2(\frac{\sec\alpha-\tan\alpha}{\sec\alpha+\tan\alpha})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{R}{\sin\theta})^2(\frac{\sec\alpha-\tan\alpha}{\cot\theta})^2 = \\ (\frac{R}{\cos\theta})^2 + (\frac{R}{\sin\theta\cot\theta})^2(\sec\alpha-\tan\alpha)^2 = \\ (\frac{R}{\cos\theta})^2(1 + \sec^2\alpha - 2\sec\alpha\tan\alpha + \tan^2\alpha) = \\ (\frac{R}{\cos\theta})^2(2\sec^2\alpha - 2\sec\alpha\tan\alpha) = \\ (R^2\sec^2\theta)2\sec\alpha(\sec\alpha - \tan\alpha) \\ \sec^2\theta = 1 + \tan^2\theta = 1 + (\frac{1}{\sec\alpha+\tan\alpha})^2 = \\ \frac{\sec^2\alpha + 2\sec\alpha\tan\alpha + \tan^2\alpha + 1}{(\sec\alpha+\tan\alpha)^2} = \\ \frac{2\sec^2\alpha + 2\sec\alpha\tan\alpha}{(\sec\alpha+\tan\alpha)^2} = \\ 2\sec\alpha\frac{\sec\alpha + \tan\alpha}{(\sec\alpha+\tan\alpha)^2} \\ (\frac{r_1}{\sin\theta})^2 + (\frac{r_2}{\cos\theta})^2 = \\ (R^2\sec^2\theta)2\sec\alpha(\sec\alpha - \tan\alpha) =\\ 4R^2\sec\alpha\frac{\sec\alpha + \tan\alpha}{(\sec\alpha+\tan\alpha)^2}\sec\alpha(\sec\alpha - \tan\alpha) = \\ 4R^2(\frac{\sec\alpha}{\sec\alpha+\tan\alpha})^2(\sec^2\alpha-\tan^2\alpha) = \\ 4R^2(\frac{1}{1+\sin\alpha})^2 \\ O_1O_2 = \sqrt{(\frac{r_1}{\sin\theta})^2 + (\frac{r_2}{\cos\theta})^2} = R\frac{2}{1+\sin\alpha} = r_1 + r_2 \end{aligned} $$

The following theorem also holds symmetrically.

Theorem 9

At \((R,\tan \beta + \sec \beta )\) point, r 1 and r 2 go to tangent position.

According to Theorem 9, the following theorem is the solution of Malffati two circle problem as corollary of Theorem 7. It is also the greedy arrangement of the two circles in the triangles.

Corollary 10

For all tangent circle O 1 and circle O 2 insideABC, if β is the smallest half angle ofABC , the \(r_1^2 + r_2^2\) reach its maximum value \([(\frac {\sec \beta - \tan \beta }{\sec \beta + \tan \beta })^2+1]R^2\).