lunes, 27 de junio de 2022

A generalization of the Pythagorean trigonometric identity

"Discovery is seeing what everybody else has seen, and thinking what nobody else has thought."

-- Albert Szent-Györgyi (1893 - 1986)

I don't know how I missed it, but the Pythagorean trigonometric identity is a special case of the generalized half-angle formulas. 

The following is a generalization of the half-angle formulas for a triangle.

Generalization. Let $a$, $b$, $c$, $d$ be the sides of a general convex quadrilateral, $s$ is the semiperimeter, and  $\alpha$ and $\gamma$ are opposite angles, then

$$ad\sin^2{\frac{\alpha}{2}}+bc\cos^2{\frac{\gamma}{2}}=(s-a)(s-d).\tag{1}$$

For a proof of $(1)$ see pp. 8 in MATINF.

The Pythagorean identity as a special case

 In $(1)$, consider the case when $a=c$, $b=d$ and $\alpha=\gamma$ so that the quadrilateral is a parallelogram . Then

$$ab\sin^2{\frac{\alpha}{2}}+ab\cos^2{\frac{\alpha}{2}}=\frac{-a+b+c+d}{2}\cdot{\frac{a+b+c-d}{2}}=ab.$$

Dividing both sides by $ab$ you get

$$\sin^2{\frac{\alpha}{2}}+\cos^2{\frac{\alpha}{2}}=1.$$


Or by making $\frac{\alpha}{2}=\theta$,

$$\sin^2{\theta}+\cos^2{\theta}=1,$$

which is the Pythagorean trigonometric identity.

An interesting discussion about this generalization is available at MathSE.

For more implications of $(1)$ I invite you to see The theoretical importance of the half-angle formulas.

sábado, 25 de junio de 2022

Another proof of Euler inequality via the half-angle formulas

The Euler's inequality is an immediate consequence of Euler's identity in a triangle,
$$OI^2=R^2−2Rr.$$
An additional proof of Euler's inequality is given at Elias Lampakis, Am Math Monthly, 122 (9), November 2015, p 892. Now, continuing with this madness of proving everything from the half-angle formulas, we give an alternative proof of Euler's inequality.

Theorem (Euler): If $R$ and $r$ are the circumradius and, respectively, the inradius of a triangle, then
$$R\geq2r.\tag{1}$$

Proof. Let $a$, $b$ and $c$ be the sides of $\triangle{ABC}$. Denote $s$ its semiperimeter and $\angle{BAC}=\alpha$. It is easy to show that 
$$(s-a)\tan{\frac{\alpha}{2}}=r.\tag{2}$$
Also, it is well-known that
$$\frac{abc}{4\Delta}=R\qquad and \qquad\Delta=\frac{bc\sin{\alpha}}{2},\tag{3}$$
where $\Delta$ is the area of $\triangle{ABC}$. Substituting $(2)$ and $(3)$ in $(1)$ we have
$$\begin{aligned}\frac{abc}{4\Delta}&\geq(-a+b+c)\tan{\frac{\alpha}{2}}\\\frac{abc}{4bc\sin{\frac{\alpha}{2}}\cos{\frac{\alpha}{2}}}&\geq(-a+b+c)\tan{\frac{\alpha}{2}}\\abc&\geq(-a+b+c)(4bc\sin^2{\frac{\alpha}{2}})\\abc&\geq(-a+b+c)(a-b+c)(a+b-c)\end{aligned}$$
This is Padoa's inequality, so the proof is complete.

domingo, 19 de junio de 2022

$\sum_{cyc}\tan\frac\alpha2\tan\frac\beta2\geq4$ for a cyclic quadrilateral

 Let $ABCD$ be a cyclic quadrilateral with sides $a$, $b$, $c$ and $d$. Denote $s$ the semiperimeter and let $\angle{DAB}=\alpha$, $\angle{ABC}=\beta$, $\angle{BCD}=\gamma$ and $\angle{CDA}=\delta$. Then the following inequality holds

$$\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\gamma}{2}}\tan{\frac{\delta}{2}}+\tan{\frac{\delta}{2}}\tan{\frac{\alpha}{2}}\geq4.\tag{1}$$

Proof. Substituting from the half-angle formula for the tangent we have that
$$\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}=\sqrt{\frac{(s-a)(s-d)}{(s-b)(s-c)}}\cdot{\sqrt{\frac{(s-a)(s-b)}{(s-c)(s-d)}}}=\frac{s-a}{s-c}.$$
Similarly, 
$$\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}=\frac{s-b}{s-d}\qquad\tan{\frac{\gamma}{2}}\tan{\frac{\delta}{2}}=\frac{s-c}{s-a}\qquad\tan{\frac{\delta}{2}}\tan{\frac{\alpha}{2}}=\frac{s-d}{s-b}$$
Thus, the left-hand side of $(1)$ can be rewritten as follows
$$\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\gamma}{2}}\tan{\frac{\delta}{2}}+\tan{\frac{\delta}{2}}\tan{\frac{\alpha}{2}}=\frac{s-a}{s-c}+\frac{s-b}{s-d}+\frac{s-c}{s-a}+\frac{s-d}{s-b}.$$
But, 
$$\frac{s-a}{s-c}+\frac{s-b}{s-d}+\frac{s-c}{s-a}+\frac{s-d}{s-b}=\frac{a-c}{s-a}+\frac{b-d}{s-b}+\frac{c-a}{s-c}+\frac{d-b}{s-d}+4.\tag{2}$$
Since $\frac{a-c}{s-a}+\frac{c-a}{s-c}=\frac{4(a-c)^2}{(-a+b+c+d)(a+b-c+d)}$, and similarly for $\frac{b-d}{s-b}+\frac{d-b}{s-d}$, then $\frac{a-c}{s-a}+\frac{b-d}{s-b}+\frac{c-a}{s-c}+\frac{d-b}{s-d}$ is positive. Hence,
$$\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\gamma}{2}}\tan{\frac{\delta}{2}}+\tan{\frac{\delta}{2}}\tan{\frac{\alpha}{2}}\geq4.$$
$\square$
Notice equality holds when $ABCD$ is rectangular. 

From $(2)$ it also follows that

$$\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\gamma}{2}}\tan{\frac{\delta}{2}}+\tan{\frac{\delta}{2}}\tan{\frac{\alpha}{2}}>\frac{a-c}{s-a}-\frac{a-c}{s-c}+\frac{b-d}{s-b}-\frac{ b-d}{s-d}.$$

A huge list of inequalities can be seen at Cut-the-knot.org.

lunes, 23 de mayo de 2022

The theoretical importance of half-angle formulas

"The scientific principles that man employs to obtain the foreknowledge of an eclipse, or of any thing else relating to the motion of the heavenly bodies, are contained chiefly in that part of science that is called trigonometry, or the properties of a triangle, which, when applied to the study of the heavenly bodies, is called astronomy; when applied to direct the course of a ship on the ocean, it is called navigation; when applied to the construction of figures drawn by a ruler and compass, it is called geometry; when applied to the construction of plans of edifices, it is called architecture; when applied to the measurement of any portion of the surface of the earth, it is called land-surveying. In fine, it is the soul of science. It is an eternal truth: it contains the mathematical demonstration of which man speaks, and the extent of its uses are unknown." Thomas Paine 

Unlike the laws of sinescosines and tangents, which are very well known, the half-angle formulas seem (although they appear timidly in the mathematical literature) not to enjoy the same popularity. Thus, while there are entire chapters devoted to the law of sines, cosines, and tangents and their applications, there is not even a Wikipedia article on half-angle formulas. Right now you may be imagining this version of the half angle formulas

$$\sin{\frac{\alpha}{2}}=\pm\sqrt{\frac{1-\cos{\alpha}}{2}}\qquad\qquad\cos{\frac{\alpha}{2}}=\pm\sqrt{\frac{1+\cos{\alpha}}{2}},$$

that do appear in the textbooks of the first trigonometry courses (at least with the one I studied). But actually I mean these

$$\sin^2{\frac{\alpha}{2}} = \frac{(s-b)(s-c)}{bc}\qquad\qquad\cos^2{\frac{\alpha}{2}}= \frac{s(s-a)}{bc},\tag{1}$$ 

where $a$, $b$, and $c$ are the sides of a triangle, $\alpha$ is the angle opposite side $a$, and $s$ is the semiperimeter. I found the furthest reference to these formulas in a conversation posted online between Conway and Doyle, where Conway uses them to prove Heron's formula and later claims to have taken it from a sequel by Casey.

I discovered $(1)$ independently trying to prove the law of cosines by contradiction. When I realized that they were known, I tried to generalize them and I got this

$$\sin^2{\frac{\alpha}{2}}=\frac{(s-a)(s-d)}{ad+bc}\qquad\qquad \cos^2{\frac{\alpha}{2}}=\frac{(s-b)(s-c)}{ad+bc},\tag{2}$$

where $a$, $b$, $c$ and $d$ are the sides of a cyclic quadrilateral, $s$ is semiperimeter and $\angle{DAB}=\alpha$.

Before discovering the conversation between Conway and Doyle, I had been excited that I had found an original proof of Heron's formula using $(1)$. When I found $(2)$, I thought that by analogous reasoning I could prove Brahmagupta's formula. So it was. But in a geometry forum someone referred me to an ancient Greek book that contained $(2)$. I then sent my proof of Brahmagupta's formula to Martin Josefsson who referred me to Casey's book "A Treatise On Plane Trigonometry" where my proof already appeared. But I didn't give up and tried to generalize $(2)$ getting this

$$ad\sin^2{\frac{\alpha}{2}}+bc\cos^2{\frac{\gamma}{2}}=(s-a)(s-d)\qquad\qquad bc\sin^2{\frac{\gamma}{2}}+ad\cos^2{\frac{\alpha}{2}}=(s-b)(s-c),\tag{3}$$

where $a$, $b$, $c$ and $d$ are the sides of a general quadrilateral, $s$ is semiperimeter, $\angle{DAB}=\alpha$ and $\angle{BCD}=\gamma$. Surprisingly, $(3)$ also generalizes the Pythagorean identity! Take a look at GeoDom - A generalization of the Pythagorean trigonometric identity.

Bretschneider's formula is known to be a generalization of Heron's and Brahmagupta's formulas. Naturally, I wondered if I could generalize Casey's proof of Brahmagupta's formula using $(3)$ and thus derive Bretschneider's formula. And I did it. I sent my formulas in $(3)$ and my proof of the Bretschneider's formula to Josefsson (among many other mathematicians) and he told me this:

"I like your paper, especially how you put these important formulas in a single framwork. I cannot say that I remember seeing the identities (4) and (5) anywhere else before."

Where identities (4) and (5) are the identities $(3)$ in this post.

And then he said:

"Even though much has already been written about these formulas, the ideas for proving Bretschneider' formula and the area of a bicentric quadrilateral are novel as far as I know. I hope you get your paper published."

I decided to write an article about these formulas called "Two Identities and their Consequences" which was published in MATINF.

In almost three years of exploring possible applications of $(1, 2, 3)$, this is what I have found:

Using $(1, 2)$ we can also derive (you can see most of the proofs here):

  •  The law of cosines
  •  The law of sines
  •  The law of tangents
  •  Stewart's theorem
  •  Compound angle formulas
  •  Mollweide's formula
  •  The product $AI\cdot{BI}\cdot{CI}$
  •  The bisector length formula
  •  Mahavira's formulas
  •  Zelich's lemma
  • Euler's triangle inequality
  • Yun’s Inequality (Josefsson)

Other unnamed identities and inequalities:

  •  $\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\alpha}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}=1$
  •  $r=4R\sin{\frac{\alpha}{2}}\sin{\frac{\beta}{2}}\sin{\frac{\gamma}{2}}$
  •  $s=4R\cos{\frac{\alpha}{2}}\cos{\frac{\beta}{2}}\cos{\frac{\gamma}{2}}$
  • $\sin{\frac{\alpha}{2}}\sin{\frac{\beta}{2}}\sin{\frac{\gamma}{2}}\le\frac{1}{8}$
  • $\sum_{cyc}\tan\frac\alpha2\tan\frac\beta2\geq4$ for a cyclic quadrilateral
  • I could go on...

The formulas $(1, 2, 3)$ explain the Heron-Brahmagupta-Bretschneider development better than I have seen anywhere else. This made me wonder what would happen if I analogously applied the half-angle formulas to formulas where half-angles explicitly appeared, such as Mollweide's (rather Newton's) formula or the law of tangents. This is how these generalizations arose:

When questioning Martin Josefsson about the originality of these generalizations, this is what he said:

"As far as I can recall, I have not seen any of them, at least not in modern books or papers, and even if some of them where to be found in an old text, they are at least not well known, and deserve to be wider known."

And Alexander Mednykh said:

"I never saw these results before. Certainly, it is interesting to find a no-Euclidean generalization of these results."

Apart from the proof of the Bretschneider's formula, I haven't found any other applications for $(3)$.

Interestingly, half angles seem to be everywhere: from circle angle theorems to the Weierstrass substitution in Integral Calculus. Even when Viète derived his formula for $\pi$ using an infinite product, he started by writing $\sin{x}=2\sin{\frac12x}\cos{\frac12x}$.

Some comments:

Thibaut Demaerel, from Leuven University, commented:


Check out the details of his proof at MathSE.

Dr. James Cook commented at Math Educators SE (where due to the controversy that my publication generated I decided to delete it):


Related material

domingo, 22 de mayo de 2022

La importancia teórica de las fórmulas de medio ángulo

 A diferencia de las leyes de senosde cosenosde las tangentes, que son muy bien conocidas, las fórmulas de medio ángulo parecen (aunque aparecen tímidamente en la literatura matemática) no gozar de la misma popularidad. Así, mientras hay capítulos enteros dedicados a la ley de senos, de cosenos, de tangentes y a sus aplicaciones, no hay ni siquiera un artículo de Wikipedia sobre las fórmulas de medio ángulo. En estos momentos a lo mejor te estés imaginando esta versión de las fórmulas de medio ángulo

$$\sin{\frac{\alpha}{2}}=\pm\sqrt{\frac{1-\cos{\alpha}}{2}}\qquad\qquad\cos{\frac{\alpha}{2}}=\pm\sqrt{\frac{1+\cos{\alpha}}{2}},$$

que sí aparecen en los libros de texto de los primeros cursos de trigonometría (por lo menos con el que yo estudié). Pero en realidad me refiero a estas

$$\sin^2{\frac{\alpha}{2}} = \frac{(s-b)(s-c)}{bc}\qquad\qquad\cos^2{\frac{\alpha}{2}}= \frac{s(s-a)}{bc},\tag{1}$$ 

donde $a$, $b$ y $c$ son los lados de un triángulo, $\alpha$ es el ángulo opuesto al lado $a$ y $s$ es el semiperímetro. La referencia más remota de estas fórmulas la encontré en una conversación publicada online entre Conway y Doyle, donde Conway las usa para demostrar la fórmula de Herón y luego señala haber sacado la demostración de una secuela de Casey.

Descubrí $(1)$ de manera independiente intentando demostrar la ley de cosenos por contradicción. Cuando me di cuenta que eran conocidas, intenté generalizarlas y obtuve esto

$$\sin^2{\frac{\alpha}{2}}=\frac{(s-a)(s-d)}{ad+bc}\qquad\qquad \cos^2{\frac{\alpha}{2}}=\frac{(s-b)(s-c)}{ad+bc},\tag{2}$$

donde $a$, $b$, $c$ y $d$ son los lados de un cuadrilátero cíclico, $s$ es su semiperímetro y $\angle{DAB}=\alpha$.

Antes de descubrir la conversación entre Conway y Doyle, me había ilusionado pensando haber encontrado una demostración original de la fórmula de Herón usando $(1)$. Cuando encontré $(2)$, pensé que por un razonamiento análogo lograría demostrar la fórmula de Brahmagupta. Y así fue. Pero en un foro de geometría alguien me refirió a un antiguo libro griego que contenía a $(2)$. Luego envié mi demostración de la fórmula de Brahmagupta a Martin Josefsson quien me remitió al libro «A Treatise On Plane Trigonometry» de Casey, donde ya aparecía mi demostración. Pero no me rendí e intenté generalizar $(2)$ consiguiendo esto

$$ad\sin^2{\frac{\alpha}{2}}+bc\cos^2{\frac{\gamma}{2}}=(s-a)(s-d)\qquad\qquad bc\sin^2{\frac{\gamma}{2}}+ad\cos^2{\frac{\alpha}{2}}=(s-b)(s-c),\tag{3}$$

donde $a$, $b$, $c$ y $d$ son los lados de un cuadrilátero general, $s$ su semiperímetro, $\angle{DAB}=\alpha$ y $\angle{BCD}=\gamma$.

La fórmula de Bretschneider es conocida por ser una generalización de las fórmulas de Herón y Brahmagupta. Naturalmente, me pregunté si podría generalizar la demostración de Casey de la fórmula de Brahmagupta usando $(3)$ y así derivar la fórmula de Bretschneider. Y lo hice. Envié mis fórmulas en $(3)$ y mi demostración de la fórmula de Bretschneider a Josefsson (entre muchos otros matemáticos) y esto me dijo:

«Me gusta su artículo, especialmente cómo pone estas fórmulas importantes en un solo marco. No puedo decir que recuerdo haber visto las identidades (4) y (5) en ningún otro lugar antes.»

Donde las identidades $(4)$ y $(5)$ son las identidades en $(3)$ de esta publicación.

Y luego dijo:

«Aunque ya se ha escrito mucho sobre estas fórmulas, las ideas para probar la fórmula de Bretschneider y el área de un cuadrilátero bicéntrico son novedosas que yo sepa. Espero que publiquen su trabajo.»

Decidí escribir un artículo sobre estas fórmulas titulado «Two Identities and their Consequences» que se publicó en MATINF, una revista rumana.

En casi tres años que tengo explorando posibles aplicaciones de $(1, 2, 3)$, esto es lo que he encontrado:

Usando $(1, 2)$  también podemos derivar (puedes ver las demostraciones aquí):
  • La ley de cosenos
  • La ley de senos
  • La ley de las tangentes
  • El teorema de Stewart
  • Las fórmulas para ángulos compuestos
  • La fórmula de Mollweide
  • El producto $AI\cdot{BI}\cdot{CI}$
  • La fórmula de la longitud del bisector
  • Las fórmulas de Mahavira
  • El lema de Zelich

Otras más obvias:
  • $\tan{\frac{\alpha}{2}}\tan{\frac{\beta}{2}}+\tan{\frac{\alpha}{2}}\tan{\frac{\gamma}{2}}+\tan{\frac{\beta}{2}}\tan{\frac{\gamma}{2}}=1$
  • $r=4R\sin{\frac{\alpha}{2}}\sin{\frac{\beta}{2}}\sin{\frac{\gamma}{2}}$
  • $s=4R\cos{\frac{\alpha}{2}}\cos{\frac{\beta}{2}}\cos{\frac{\gamma}{2}}$
  • Podría seguir...

Las fórmulas $(1, 2, 3)$ explican mejor de lo que he visto en cualquier otra parte el desarrollo Herón-Brahmagupta-Bretschneider. Esto me hizo preguntarme qué pasaría si aplicaba de forma análoga las fórmulas de medio ángulo a fórmulas donde aparecían de forma explícita ángulos medios, como la fórmula de Mollweide (o de Newton) o la ley de tangentes. Es así como surgieron estas dos generalizaciones:


Al cuestionar a Martin Josefsson sobre la originalidad de estas generalizaciones esto fue lo que dijo:

«Hasta donde puedo recordar, no he visto ninguna de ellas, al menos no en libros o artículos modernos, e incluso si alguna de ellas se encuentra en un texto antiguo, al menos no son muy conocidas, y merecen ser más conocidas.»


«Nunca vi estos resultados antes. Ciertamente, sería interesante encontrar una generalización no euclidiana de estos resultados.»

Aparte de la demostración de la fórmula de Bretschneider, no he encontrado más aplicaciones para $(3)$.

Curiosamente, los ángulos medios parecen estar por todas partes: desde los teoremas de ángulos en una circunferencia hasta la técnica de Sustitución de Weierstrass en Cálculo Integral. Incluso cuando Viète encontró su fórmula de $\pi$ usando un producto infinito, él empezó escribiendo $\sin{x}=2\sin{\frac12x}\cos{\frac12x}$. 

Algunos comentarios adicionales:

Thibaut Demaerel, investigador postdoctoral en física teórica en KU Leuven, comentó en el foro MathSE:
«Yo argumentaría (ciertamente un poco por la tangente) que tales fórmulas de medio ángulo proporcionan un medio elemental para probar el teorema fundamental del álgebra (una prueba accesible para una audiencia de secundaria).»

James Cook, de la Universidad de Alabama, comentó:
«Creo que has presentado un caso convincente de que estas fórmulas son bastante básicas. Por supuesto, sospecho que podría derivarse casi todo partiendo de la ley de los cosenos. ¿Qué es la ley de cosenos sino el corazón del producto escalar? Y, ¿qué es el producto escalar? Es la encapsulación algebraica del ángulo. Como mínimo, esto debería aparecer como problemas o una sección de tema adicional en los textos de trigonometría. Parece que esto sería excelente para un curso de honor de escuela de verano para dotados en matemáticas. El hecho de que no se enseñe podría aprovecharse para permitir que los estudiantes lo descubran.»

miércoles, 27 de abril de 2022

The compound angle formulas from the half angle formulas

My goal is not necessarily to give the simplest derivation. I've been trying to rescue the half angle formulas from oblivion and give them the status they deserve by showing its many applications.

Various proofs of the formulas of compound angles are given here. The cosine of the sum of two angles is given by the formula

$$\cos{(\alpha+\beta)}=\cos{\alpha}\cos{\beta}-\sin{\alpha}\sin{\beta}\tag{1}$$

Proof. We take advantage of the cyclic nature of the half angle formulas whose proof can be found here. The proof of the half angle formulas given in the link makes use of the Pythagorean trigonometric identity and the double-angle formula for sine whose proofs (I hope you clicked on the links) are independent of the compound angle formulas.

Suppose $\triangle{ABC}$ is a triangle with sides $|BA|=a$, $|AC|=b$ and $|AB|=c$. Let $\angle{BAC}=2\alpha$, $\angle{CBA}=2\beta$ and $\angle{ACB}=2\gamma$. Let's start with the right-hand side of formula $(1)$. Substituting from the half angle formulas we have 

$$\begin{aligned} \cos{\alpha}\cos{\beta}-\sin{\alpha}\sin{\beta} &= \sqrt{\frac{s(s-a)}{bc}\cdot{\frac{s(s-b)}{ac}}}-\sqrt{\frac{(s-b)(s-c)}{bc}\cdot{\frac{(s-a)(s-c)}{ac}}}\\&=\frac{s}{c}\cdot{\sqrt{\frac{(s-a)(s-b)}{ab}}}-\frac{s-c}{c}\cdot{\sqrt{\frac{(s-a)(s-b)}{ab}}}\\&=\sqrt{\frac{(s-a)(s-b)}{ab}}\cdot{\left(\frac{s}{c}-\frac{s-c}{c}\right)}\\&=\sin{\gamma}\\&=\sin{\left(\frac{\pi}{2}-(\alpha+\beta)\right)}\\&=\cos{(\alpha+\beta)}\end{aligned}$$

$\square$

The other formulas of compound angles can be obtained similarly.

domingo, 27 de marzo de 2022

A generalization of the law of tangent for a cyclic quadrilateral

The law of tangents is a statement about the relationship between the tangents of two angles of a triangle and the lengths of the opposing sides.

Let $a$, $b$, and $c$ be the lengths of the three sides of a triangle, and $\alpha$, $\beta$ and $\gamma$ be the angles opposite those three respective sides. The law of tangents states that
$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{a-b}{a+b}\tag{1}$$

The law of tangent can be used in any case where two sides and the included angle, or two angles and a side, are known.

Although Viète gave us the modern version of the law of tangents, it was Fincke who stated the law of tangents for the first time and also demonstrated its application by solving a triangle when two sides and the included angle are given. An excellent overview of the history of the law of tangents together with several proofs are given by Wu - The Story of Mollweide and Some Trigonometric Identities.

Generalization. Let $a$, $b$, $c$ and $d$ be the sides of a cyclic convex quadrilateral. Let $\angle{DAB}=\alpha$ and $\angle{ABC}=\beta$, then the following identity holds

$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{(a-c)(b-d)}{(a+c)(b+d)}\tag{2}$$

Proof. Using the sum-to-product formulas we can rewrite the left-hand side of $(2)$ as follows

$$\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}=\frac{\sin\frac12(\alpha-\beta)\cos\frac12(\alpha+\beta)}{\cos\frac12(\alpha-\beta)\sin\frac12(\alpha+\beta)}=\frac{\sin{\alpha}-\sin{\beta}}{\sin{\alpha}+\sin{\beta}}$$

The area of a cyclic quadrilateral can be expressed as $\Delta=\frac12(ad+bc)\sin{\alpha}$ (see $(12)$ at Killing three birds with one stone) and similarly for the other angles. Then substituting, simplifying and factorizing we have

$$\begin{align*}\frac{\tan\frac12(\alpha-\beta)}{\tan\frac12(\alpha+\beta)}&=\frac{\frac{2\Delta}{ad+bc}-\frac{2\Delta}{ab+cd}}{\frac{2\Delta}{ad+bc}+\frac{2\Delta}{ab+cd}}=\frac{ab-ad+cd-bc}{ab+ad+cd+bc}=\frac{(a-c)(b-d)}{(a+c)(b+d)}\end{align*}$$

$\square$

The formula $(2)$ reduces to the law of tangent for a triangle when $c=0$.

A historical correction: Fincke was not the first to publish the law of tangents. It was actually Ibn Muadh who first described it in the 11th century. See the discussion at HSMSE.