# Tangent half-angle formula

https://en.wikipedia.org/wiki/Tangent_half-angle_formula

In trigonometry, tangent half-angle formulas relate the tangent of half of an angle to trigonometric functions of the entire angle. The tangent of half an angle is the stereographic projection of the circle onto a line. Among these formulas are the following:

{\displaystyle {\begin{aligned}\tan {\tfrac {1}{2}}(\eta \pm \theta )&={\frac {\tan {\tfrac {1}{2}}\eta \pm \tan {\tfrac {1}{2}}\theta }{1\mp \tan {\tfrac {1}{2}}\eta \,\tan {\tfrac {1}{2}}\theta }}={\frac {\sin \eta \pm \sin \theta }{\cos \eta +\cos \theta }}=-{\frac {\cos \eta -\cos \theta }{\sin \eta \mp \sin \theta }},\\[10pt]\tan \pm {\tfrac {1}{2}}\theta &={\frac {\pm \sin \theta }{1+\cos \theta }}={\frac {\pm \tan \theta }{\sec \theta +1}}={\frac {\pm 1}{\csc \theta +\cot \theta }},&&(\eta =0)\\[10pt]\tan \pm {\tfrac {1}{2}}\theta &={\frac {1-\cos \theta }{\pm \sin \theta }}={\frac {\sec \theta -1}{\pm \tan \theta }}=\pm (\csc \theta -\cot \theta ),&&(\eta =0)\\[10pt]\tan {\tfrac {1}{2}}{\big (}\theta \pm {\tfrac {1}{2}}\pi {\big )}&={\frac {1\pm \sin \theta }{\cos \theta }}=\sec \theta \pm \tan \theta ={\frac {\csc \theta \pm 1}{\cot \theta }},&&{\big (}\eta ={\tfrac {1}{2}}\pi {\big )}\\[10pt]\tan {\tfrac {1}{2}}{\big (}\theta \pm {\tfrac {1}{2}}\pi {\big )}&={\frac {\cos \theta }{1\mp \sin \theta }}={\frac {1}{\sec \theta \mp \tan \theta }}={\frac {\cot \theta }{\csc \theta \mp 1}},&&{\big (}\eta ={\tfrac {1}{2}}\pi {\big )}\\[10pt]{\frac {1-\tan {\tfrac {1}{2}}\theta }{1+\tan {\tfrac {1}{2}}\theta }}&=\pm {\sqrt {\frac {1-\sin \theta }{1+\sin \theta }}}\\[10pt]\tan {\tfrac {1}{2}}\theta &=\pm {\sqrt {\frac {1-\cos \theta }{1+\cos \theta }}}\\[10pt]\end{aligned}}}

From these one can derive identities expressing the sine, cosine, and tangent as functions of tangents of half-angles:

{\displaystyle {\begin{aligned}\sin \alpha &={\frac {2\tan {\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }}\\[7pt]\cos \alpha &={\frac {1-\tan ^{2}{\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }}\\[7pt]\tan \alpha &={\frac {2\tan {\tfrac {1}{2}}\alpha }{1-\tan ^{2}{\tfrac {1}{2}}\alpha }}\end{aligned}}}

## Proofs

### Algebraic proofs

Using double-angle formulae and the Pythagorean identity ${\displaystyle 1+\tan ^{2}\alpha =1{\big /}\cos ^{2}\alpha }$ gives

${\displaystyle \sin \alpha =2\sin {\tfrac {1}{2}}\alpha \cos {\tfrac {1}{2}}\alpha ={\frac {2\sin {\tfrac {1}{2}}\alpha \,\cos {\tfrac {1}{2}}\alpha {\Big /}\cos ^{2}{\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }}={\frac {2\tan {\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }},\quad {\text{and}}}$
${\displaystyle \cos \alpha =\cos ^{2}{\tfrac {1}{2}}\alpha -\sin ^{2}{\tfrac {1}{2}}\alpha ={\frac {\left(\cos ^{2}{\tfrac {1}{2}}\alpha -\sin ^{2}{\tfrac {1}{2}}\alpha \right){\Big /}\cos ^{2}{\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }}={\frac {1-\tan ^{2}{\tfrac {1}{2}}\alpha }{1+\tan ^{2}{\tfrac {1}{2}}\alpha }},\quad {\text{and}}}$

Taking the quotient of the formulae for sine and cosine yields

${\displaystyle \tan \alpha ={\frac {2\tan {\tfrac {1}{2}}\alpha }{1-\tan ^{2}{\tfrac {1}{2}}\alpha }}.}$

Combining the Pythagorean identity with the double-angle formula for the cosine, ${\displaystyle \cos 2\alpha =\cos ^{2}\alpha -\sin ^{2}\alpha =1-2\sin ^{2}\alpha =2\cos ^{2}\alpha -1}$,

rearranging, and taking the square roots yields

${\displaystyle |\sin \alpha |={\sqrt {\frac {1-\cos 2\alpha }{2}}}}$ and ${\displaystyle |\cos \alpha |={\sqrt {\frac {1+\cos 2\alpha }{2}}}}$

which, upon division gives

${\displaystyle |\tan \alpha |={\frac {\sqrt {1-\cos 2\alpha }}{\sqrt {1+\cos 2\alpha }}}={\frac {{\sqrt {1-\cos 2\alpha }}{\sqrt {1+\cos 2\alpha }}}{1+\cos 2\alpha }}={\frac {\sqrt {1-\cos ^{2}2\alpha }}{1+\cos 2\alpha }}={\frac {|\sin 2\alpha |}{1+\cos 2\alpha }}.}$

Alternatively,

${\displaystyle |\tan \alpha |={\frac {\sqrt {1-\cos 2\alpha }}{\sqrt {1+\cos 2\alpha }}}={\frac {1-\cos 2\alpha }{{\sqrt {1+\cos 2\alpha }}{\sqrt {1-\cos 2\alpha }}}}={\frac {1-\cos 2\alpha }{\sqrt {1-\cos ^{2}2\alpha }}}={\frac {1-\cos 2\alpha }{|\sin 2\alpha |}}.}$

The absolute value signs may be dropped when working only in the first quadrant.

Also, using the angle addition and subtraction formulae for both the sine and cosine one obtains:

${\displaystyle \cos(a+b)=\cos a\cos b-\sin a\sin b}$
${\displaystyle \cos(a-b)=\cos a\cos b+\sin a\sin b}$
${\displaystyle \sin(a+b)=\sin a\cos b+\cos a\sin b}$
${\displaystyle \sin(a-b)=\sin a\cos b-\cos a\sin b}$

Pairwise addition of the above four formulae yields:

{\displaystyle {\begin{aligned}&\sin(a+b)+\sin(a-b)\\[5mu]&\quad =\sin a\cos b+\cos a\sin b+\sin a\cos b-\cos a\sin b\\[5mu]&\quad =2\sin a\cos b\\[15mu]&\cos(a+b)+\cos(a-b)\\[5mu]&\quad =\cos a\cos b-\sin a\sin b+\cos a\cos b+\sin a\sin b\\[5mu]&\quad =2\cos a\cos b\end{aligned}}}

Setting ${\displaystyle a={\tfrac {1}{2}}(p+q)}$ and ${\displaystyle b={\tfrac {1}{2}}(p-q)}$ and substituting yields:

{\displaystyle {\begin{aligned}&\sin p+\sin q\\[5mu]&\quad =\sin \left({\tfrac {1}{2}}(p+q)+{\tfrac {1}{2}}(p-q)\right)+\sin \left({\tfrac {1}{2}}(p+q)-{\tfrac {1}{2}}(p-q)\right)\\[5mu]&\quad =2\sin {\tfrac {1}{2}}(p+q)\,\cos {\tfrac {1}{2}}(p-q)\\[15mu]&\cos p+\cos q\\[5mu]&\quad =\cos \left({\tfrac {1}{2}}(p+q)+{\tfrac {1}{2}}(p-q)\right)+\cos \left({\tfrac {1}{2}}(p+q)-{\tfrac {1}{2}}(p-q)\right)\\[5mu]&\quad =2\cos {\tfrac {1}{2}}(p+q)\,\cos {\tfrac {1}{2}}(p-q)\end{aligned}}}

Dividing the sum of sines by the sum of cosines one arrives at:

${\displaystyle {\frac {\sin p+\sin q}{\cos p+\cos q}}={\frac {2\sin {\tfrac {1}{2}}(p+q)\,\cos {\tfrac {1}{2}}(p-q)}{2\cos {\tfrac {1}{2}}(p+q)\,\cos {\tfrac {1}{2}}(p-q)}}=\tan {\tfrac {1}{2}}(p+q)}$

### Geometric proofs

Applying the formulae derived above to the rhombus figure on the right, it is readily shown that

The sides of this rhombus have length 1. The angle between the horizontal line and the shown diagonal is ${\displaystyle {\tfrac {1}{2}}(a+b)}$. This is a geometric way to prove the particular tangent half-angle formula that says ${\textstyle \tan {\tfrac {1}{2}}(a+b)={\dfrac {\sin a+\sin b}{\cos a+\cos b}}.}$ The formulae ${\displaystyle \sin {\tfrac {1}{2}}(a+b)}$ and ${\displaystyle \cos {\tfrac {1}{2}}(a+b)}$ are the ratios of the actual distances to the length of the diagonal.
${\displaystyle \tan {\tfrac {1}{2}}(a+b)={\frac {\sin {\tfrac {1}{2}}(a+b)}{\cos {\tfrac {1}{2}}(a+b)}}={\frac {\sin a+\sin b}{\cos a+\cos b}}.}$

In the unit circle, application of the above shows that ${\displaystyle t=\tan {\tfrac {1}{2}}\varphi }$. By similarity of triangles,

${\displaystyle {\frac {t}{\sin \varphi }}={\frac {1}{1+\cos \varphi }}}$. It follows that ${\displaystyle t={\frac {\sin \varphi }{1+\cos \varphi }}={\frac {\sin \varphi (1-\cos \varphi )}{(1+\cos \varphi )(1-\cos \varphi )}}={\frac {1-\cos \varphi }{\sin \varphi }}.}$

## The tangent half-angle substitution in integral calculus

A geometric proof of the Weierstrass substitution

In various applications of trigonometry, it is useful to rewrite the trigonometric functions (such as sine and cosine) in terms of rational functions of a new variable ${\displaystyle t}$. These identities are known collectively as the tangent half-angle formulae because of the definition of ${\displaystyle t}$. These identities can be useful in calculus for converting rational functions in sine and cosine to functions of t in order to find their antiderivatives.

Technically, the existence of the tangent half-angle formulae stems from the fact that the circle is an algebraic curve of genus 0. One then expects that the circular functions should be reducible to rational functions.

Geometrically, the construction goes like this: for any point (cos φ, sin φ) on the unit circle, draw the line passing through it and the point (−1, 0). This point crosses the y-axis at some point y = t. One can show using simple geometry that t = tan(φ/2). The equation for the drawn line is y = (1 + x)t. The equation for the intersection of the line and circle is then a quadratic equation involving t. The two solutions to this equation are (−1, 0) and (cos φ, sin φ). This allows us to write the latter as rational functions of t (solutions are given below).

The parameter t represents the stereographic projection of the point (cos φ, sin φ) onto the y-axis with the center of projection at (−1, 0). Thus, the tangent half-angle formulae give conversions between the stereographic coordinate t on the unit circle and the standard angular coordinate φ.

Then we have

{\displaystyle {\begin{aligned}&\sin \varphi ={\frac {2t}{1+t^{2}}},&&\cos \varphi ={\frac {1-t^{2}}{1+t^{2}}},\\[8pt]&\tan \varphi ={\frac {2t}{1-t^{2}}}&&\cot \varphi ={\frac {1-t^{2}}{2t}},\\[8pt]&\sec \varphi ={\frac {1+t^{2}}{1-t^{2}}},&&\csc \varphi ={\frac {1+t^{2}}{2t}},\end{aligned}}}

and

${\displaystyle e^{i\varphi }={\frac {1+it}{1-it}},\qquad e^{-i\varphi }={\frac {1-it}{1+it}}.}$

By eliminating phi between the directly above and the initial definition of ${\displaystyle t}$, one arrives at the following useful relationship for the arctangent in terms of the natural logarithm

${\displaystyle 2\arctan t=-i\ln {\frac {1+it}{1-it}}.}$

In calculus, the Weierstrass substitution is used to find antiderivatives of rational functions of sin φ and cos φ. After setting

${\displaystyle t=\tan {\tfrac {1}{2}}\varphi .}$

This implies that

${\displaystyle \varphi =2\arctan(t)+2\pi n,}$

for some integer n, and therefore

${\displaystyle d\varphi ={{2\,dt} \over {1+t^{2}}}.}$

### Hyperbolic identities

One can play an entirely analogous game with the hyperbolic functions. A point on (the right branch of) a hyperbola is given by (cosh θ, sinh θ). Projecting this onto y-axis from the center (−1, 0) gives the following:

${\displaystyle t=\tanh {\tfrac {1}{2}}\theta ={\frac {\sinh \theta }{\cosh \theta +1}}={\frac {\cosh \theta -1}{\sinh \theta }}}$

with the identities

{\displaystyle {\begin{aligned}&\sinh \theta ={\frac {2t}{1-t^{2}}},&&\cosh \theta ={\frac {1+t^{2}}{1-t^{2}}},\\[8pt]&\tanh \theta ={\frac {2t}{1+t^{2}}},&&\coth \theta ={\frac {1+t^{2}}{2t}},\\[8pt]&\operatorname {sech} \,\theta ={\frac {1-t^{2}}{1+t^{2}}},&&\operatorname {csch} \,\theta ={\frac {1-t^{2}}{2t}},\end{aligned}}}

and

${\displaystyle e^{\theta }={\frac {1+t}{1-t}},\qquad e^{-\theta }={\frac {1-t}{1+t}}.}$

Finding θ in terms of t leads to following relationship between the area hyperbolic tangent and the natural logarithm:

${\displaystyle 2\operatorname {artanh} t=\ln {\frac {1+t}{1-t}}.}$

("ar-" is used rather than "arc-" because "arc" is about arc length and "ar" abbreviates "area". It is the area between two rays and a hyperbola, rather than the arc length between two rays measured along an arc of a circle.)

## The Gudermannian function

Comparing the hyperbolic identities to the circular ones, one notices that they involve the same functions of t, just permuted. If we identify the parameter t in both cases we arrive at a relationship between the circular functions and the hyperbolic ones. That is, if

${\displaystyle t=\tan {\tfrac {1}{2}}\varphi =\tanh {\tfrac {1}{2}}\theta }$

then

${\displaystyle \varphi =2\tan ^{-1}\tanh {\tfrac {1}{2}}\theta \equiv \operatorname {gd} \theta .}$

where gd(θ) is the Gudermannian function. The Gudermannian function gives a direct relationship between the circular functions and the hyperbolic ones that does not involve complex numbers. The above descriptions of the tangent half-angle formulae (projection the unit circle and standard hyperbola onto the y-axis) give a geometric interpretation of this function.

## Pythagorean triples

The tangent of half of an acute angle of a right triangle whose sides are a Pythagorean triple will necessarily be a rational number in the interval (0, 1). Vice versa, when a half-angle tangent is a rational number in the interval (0, 1), there is a right triangle that has the full angle and that has side lengths that are a Pythagorean triple.