# Half Angle Substitution

Here’s a neat substitution for integration that I never learned from calculus subjects but found in a book. I also frequently forget the formulae so whenever I want to use it I need to re-derive everything, hopefully writing it here will help me remember.

If $x$ is our integration variable, then we make the substitution $x = \tan(t/2)$. Using the trig identities, we can now get expressions for trigonometric functions in terms of $t$.

$\sin x = 2\sin \frac{x}{2}\cos \frac{x}{2}$
$= 2\tan\frac{x}{2}\cos^2\frac{x}{2}$
$= 2\frac{t}{\sec^2(x/2)}$
$= 2t/(t^2+1)$.

$\cos x = 1 - 2\sin^2\frac{x}{2}$
$= 1 - 2\tan^2\frac{x}{2}\cos^2\frac{x}{2}$
$= (t^2+1-2t^2)/(t^2+1)$
$= (1-t^2)/(1+t^2)$

$\tan x = \sin x /\cos x$
$= 2t/(1-t^2)$

And of course $dt = \frac{1}{2}\sec^2\frac{x}{2}dx$ so $dx = 2dt/(1+t^2)$.
Now we can work out things like $\int \csc x dx$, which is given by
$\int dt/t = \ln\tan\frac{x}{2} + c$

## Author: ficetea

I'll write more here later!