The subsitution t=tanx2t=\tan\frac{x}{2} converts a rational function of sinx\sin x and cosx\cos x into a rational function of tt.
Proof: We claim that
For the first equality, we differentiate