Tangent half-angle substitution (source code)

= Tangent half-angle substitution
{wiki}

The <tangent half-angle substitution> $t=\tan(x/2)$ converts rational trigonometric expressions into rational functions: $\sin x=2t/(1+t^2)$, $\cos x=(1-t^2)/(1+t^2)$ and $dx=2\,dt/(1+t^2)$.