# 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.

## Formulae

The tangent of half an angle is the stereographic projection of the circle through the point at angle π{\textstyle \pi } radians onto the line through the angles ± π/2 {\textstyle \pm {\frac {\pi }{2}}}. Tangent half-angle formulae include ${\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 }}\,,\end{aligned}}$ with simpler formulae when η is known to be 0, π/2, π, or 3π/2 because sin(η) and cos(η) can be replaced by simple constants.
In the reverse direction, the formulae include ${\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 the angle addition and subtraction formulae for both the sine and cosine one obtains ${\begin{aligned}\sin(a+b)+\sin(a-b)&=2\sin a\cos b\\[15mu]\cos(a+b)+\cos(a-b)&=2\cos a\cos b\,.\end{aligned}}$
Setting a=1/2 (η+θ){\textstyle a={\tfrac {1}{2}}(\eta +\theta )} and $b={\tfrac {1}{2}}(\eta -\theta )$ and substituting yields ${\begin{aligned}\sin \eta +\sin \theta =2\sin {\tfrac {1}{2}}(\eta +\theta )\,\cos {\tfrac {1}{2}}(\eta -\theta )\\[15mu]\cos \eta +\cos \theta =2\cos {\tfrac {1}{2}}(\eta +\theta )\,\cos {\tfrac {1}{2}}(\eta -\theta )\,.\end{aligned}}$
Dividing the sum of sines by the sum of cosines gives ${\frac {\sin \eta +\sin \theta }{\cos \eta +\cos \theta }}=\tan {\tfrac {1}{2}}(\eta +\theta )\,.$
Also, a similar calculation starting with $\sin(a+b)-\sin(a-b)$ and $\cos(a+b)-\cos(a-b)$ gives $-{\frac {\cos \eta -\cos \theta }{\sin \eta -\sin \theta }}=\tan {\tfrac {1}{2}}(\eta +\theta )\,.$
Furthermore, using double-angle formulae and the Pythagorean identity 1+tan$^2$⁡α=1/cos$^2$⁡α{\textstyle 1+\tan ^{2}\alpha =1{\big /}\cos ^{2}\alpha } gives $\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 }}$ $\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 }}\,.$ Taking the quotient of the formulae for sine and cosine yields $\tan \alpha ={\frac {2\tan {\tfrac {1}{2}}\alpha }{1-\tan ^{2}{\tfrac {1}{2}}\alpha }}\,.$

### Geometric proofs

Applying the formulae derived above to the rhombus figure on the right, it is readily shown that
$\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 t=tan⁡ 1/2 φ{\textstyle t=\tan {\tfrac {1}{2}}\varphi }. By similarity of triangles,
${\frac {t}{\sin \varphi }}={\frac {1}{1+\cos \varphi }}.$
It follows that
$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

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 $t$. These identities are known collectively as the tangent half-angle formulae because of the definition of $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.
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
${\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
$e^{i\varphi }={\frac {1+it}{1-it}},\qquad e^{-i\varphi }={\frac {1-it}{1+it}}.$
Both this expression of $e^{i\varphi }$ and the expression $t=\tan(\varphi /2)$ can be solved for $\varphi$. Equating these gives the arctangent in terms of the natural logarithm $\arctan t={\frac {-i}{2}}\ln {\frac {1+it}{1-it}}.$
In calculus, the tangent half-angle substitution is used to find antiderivatives of rational functions of sin φ and cos φ. Differentiating $t=\tan {\tfrac {1}{2}}\varphi$ gives ${\frac {dt}{d\varphi }}={\tfrac {1}{2}}\sec ^{2}{\tfrac {1}{2}}\varphi ={\tfrac {1}{2}}(1+\tan ^{2}{\tfrac {1}{2}}\varphi )={\tfrac {1}{2}}(1+t^{2})$ and thus $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:
$t=\tanh {\tfrac {1}{2}}\psi ={\frac {\sinh \psi }{\cosh \psi +1}}={\frac {\cosh \psi -1}{\sinh \psi }}$
with the identities
${\begin{aligned}&\sinh \psi ={\frac {2t}{1-t^{2}}},&&\cosh \psi ={\frac {1+t^{2}}{1-t^{2}}},\\[8pt]&\tanh \psi ={\frac {2t}{1+t^{2}}},&&\coth \psi ={\frac {1+t^{2}}{2t}},\\[8pt]&\operatorname {sech} \,\psi ={\frac {1-t^{2}}{1+t^{2}}},&&\operatorname {csch} \,\psi ={\frac {1-t^{2}}{2t}},\end{aligned}}$
and
$e^{\psi }={\frac {1+t}{1-t}},\qquad e^{-\psi }={\frac {1-t}{1+t}}.$
Finding ψ in terms of t leads to following relationship between the inverse hyperbolic tangent $\operatorname {artanh}$ and the natural logarithm:
$2\operatorname {artanh} t=\ln {\frac {1+t}{1-t}}.$
The hyperbolic tangent half-angle substitution in calculus uses $d\psi ={{2\,dt} \over {1-t^{2}}}\,.$

## 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
$t=\tan {\tfrac {1}{2}}\varphi =\tanh {\tfrac {1}{2}}\psi$
then
$\varphi =2\arctan {\bigl\tanh {\tfrac {1}{2}}\psi \,{\bigr )}\equiv \operatorname {gd} \psi .$
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.

## Rational values and Pythagorean triples

Starting with a Pythagorean triangle with side lengths a, b, and c that are positive integers and satisfy a$^2$ + b$^2$ = c$^2$, it follows immediately that each interior angle of the triangle has rational values for sine and cosine, because these are just ratios of side lengths. Thus each of these angles has a rational value for its half-angle tangent, using tan φ/2 = sin φ / (1 + cos φ).
The reverse is also true. If there are two positive angles that sum to 90°, each with a rational half-angle tangent, and the third angle is a right angle then a triangle with these interior angles can be scaled to a Pythagorean triangle. If the third angle is not required to be a right angle, but is the angle that makes the three positive angles sum to 180° then the third angle will necessarily have a rational number for its half-angle tangent when the first two do (using angle addition and subtraction formulas for tangents) and the triangle can be scaled to a Heronian triangle.
Generally, if K is a subfield of the complex numbers then tan φ/2 ∈ K ∪ {∞} implies that {sin φ, cos φ, tan φ, sec φ, csc φ, cot φ} ⊆ K ∪ {∞}.