{'fraction_non_alphanumeric': 0.04618143775220445, 'fraction_numerical': 0.017037811986250186, 'mean_word_length': 3.856313497822932, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Schellbach-style Formulae for the Derousseau-Pampuch Generalizations of the Malfatti Circles

It is known that there exist 32 triplets of circles such that each circle is tangent to the other two circles and to two of the sides of the triangle or their extensions. We provide formulae to obtain the radii of the circles for each of the 32 triplets from the side lengths of the reference triangle by means of trigonometric or hyperbolic functions.


Introduction
The configuration of three circles inside a triangle such that each circle is tangent to the other two circles and to two of the sides of the triangle has been studied for more than two centuries. Today, such three circles are called the Malfatti circles of the triangle. Sometime before 1773, Naonobu Ajima (1732?-1798), who was a samurai, or a member of the military class in old Japan, found a method to calculate the diameters of the Malfatti circles from the side lengths of an arbitrary triangle. The method was called Nanzan-shi san-sha naiyō san-en jutsu ("Nanzan's method on a triangle that includes three circles", as Nanzan is a pen name of Ajima's) or San-sha san-en jutsu in short. A brief description of the method is found in [2, I ¶14]. A detailed description of the method including a proof is found in [1]. Unfortunately, Ajima's method as well as any other results by Japanese mathematicians in those days was inaccessible from outside Japan until the Edo shogunate, the former government of Japan (1603-1868), abandoned the isolation policy in 1854.
In 1852, Schellbach [12][13] gave a set of formulae to obtain the distances between the vertices and the tangent points of the circles on the sides from the side lengths of an arbitrary triangle by using trigonometric functions. The same formulae with a proof essentially identical to Schellbach's are described in English in [6, §30] [7].
In 1895, Derousseau [4] generalized the Malfatti circles by removing the condition that the three circles are inside the triangle. Derousseau proved that there exist 32 triplets of circles such that each circle is tangent to the other two circles and to two of the sides of the reference triangle or their extensions. Some alternative proofs of the existence are known. In 1904, Pampuch [11] gave another proof. In 1930, Lob and Richmond [9] gave yet another proof.
In this article, we provide formulae to obtain the radii of the circles for each of the 32 triplets from the side lengths by means of trigonometric or hyperbolic functions. In other words, we provide Schellbach-style formulae for all of the Derousseau-Pampuch generalizations.

Notation
Throughout this article, we use the following notation.
For a triangle ABC , let a, b, c denote the lengths of the sides BC , CA, AB , s the semiperimeter, r the inradius, and r A , r B , r C the exradii as usual.
Let the incircle is tangent to the side BC at D , to the side CA at E , and to the side AB at F . Let the excircle corresponding to the vertex A is tangent to the side BC at D A , to the extension of the side AC at E A , and to the extension of the side AB at F A .
Suppose the circle A ′ (r 1 ) is tangent to the line CA at E 1 and to the line AB at F 1 , the circle B ′ (r 2 ) is tangent to the line AB at F 2 and to the line BC at D 2 , the circle C ′ (r 3 ) is tangent to the line BC at D 3 and to the line CA at E 3 , and the three circles are tangent to one another. Suppose the nine tangent points are distinct.

Classification
Since the center A ′ does not locate neither on the line AB nor on the line AC , it locates inside ∠CAB , inside ∠C AB , inside ∠CAB or inside ∠C AB where an overline indicates that the angle has, as one of its sides, the opposite ray instead of the ray including the triangle side. For example, ∠CAB denotes the angle with the ray − − → AC and the ray opposite to the ray − → B . And ∠C AB denotes the vertical angle of ∠CAB . Analogously, the center B ′ locates inside ∠ABC , inside ∠ABC , inside ∠AB C or inside ∠AB C and the center C ′ locates inside ∠BCA, inside ∠B CA, inside ∠BC A or inside ∠B C A.
In Case 1, the following three conditions hold.
By expressing the lengths by the radii and the angle sizes, we obtain from the first disjunction that we obtain from the second disjunction that or and we obtain from the second disjunction that or Define l, m, n by Define u, v, w, x, y, z by Then we have For any triangle ABC , if l, m, n are defined by (7), then lmn = l + m + n holds. On the other hand, if positive reals l, m, n satisfy lmn = l + m + n, then there exists a triangle ABC that satisfies (7). Thus, Case 1 can be reduced into solving the system of equations (8) for u, v, w, x, y, z with positive real parameters l, m, n under the restriction lmn = l + m + n.
As we will show in Appendix A, the system of equations has the following 8 solutions. . . . .

Cases 2 & 3
In Case 2, we have that the following three disjunctions of equations hold.
By expressing the lengths by the radii and the angle sizes, we obtain from the first disjunction that we obtain from the second disjunction that and we obtain from the third disjunction that Define l,m,n by Define u, v, w, x, y, z by Then we have In Case 3, we have By expressing the lengths by the radii and the angle sizes, we obtain from the first equation that we obtain form the second conjunction that and we obtain from the third conjunction that Define l,m,n by (31). Define u, v, w, x, y, z by Then we have the same system of equations as (32).
For any triangle ABC , if l,m,n are defined by (31), then lmn = l −m −n holds. On the other hand, if positive reals l,m,n satisfy lmn = l −m −n, then there exists a triangle ABC that satisfies (31). Thus, Case 2 and Case 3 can be unified and reduced into solving the system of equations (32) for u, v, w, x, y, z with positive real parameters l,m,n under the restriction lmn = l −m −n.
As we will show in Appendix A. the system of equations has the following 8 solutions. . . . . .
Define α A , β A , γ A ∈ (0, +∞) and σ A by The fourth equation in (38) corresponds to a value of r 1 as follows.
it holds that  (45), we obtain the following respective solutions in Cases 2 and 3.
Analogously to 4.2, we obtain the following solutions in Cases 6 and 7.

A Solutions of the systems of equations
In this appendix, we will solve some systems of equations by computing Gröbner bases. Although it is difficult to compute the Gröbner bases by hand, any computer algebra system that can compute Gröbner bases should work. Proposition 1. The system of equations (8) for the variables u, v, w, x, y, z with the positive real parameters l, m, n under the restriction lmn = l + m + n. has 8 solutions (9)-(16).