The universal

substitution is a handy tool for evaluating

integrals
that consist of a

rational function of

trigonometric functions.
This is the substitution:

*u = tan(x/2)*, if originally integrating with respect to x.

You will want to substitute in for dx:

u = tan(x/2)
x/2 = arctan(u)
x = 2*arctan(u)

*dx = 2*du/(1+u^2)*
The substitutions for trigonometric functions:

sin(x) = 2*sin(x/2)*cos(x/2)
= 2*sin(x/2)*cos(x/2)^2/cos(x/2)
= 2*tan(x/2)*cos(x/2)^2
= 2*tan(x/2)/sec(x/2)^2
= 2*tan(x/2)/(1+tan(x/2)^2)

*sin(x) = 2*u/(1+u^2)*
cos(x)^2 = 1 - sin(x)^2
= 1 - (2*u/(1+u^2))^2
= 1 - 4*u^2/(1+u^2)^2
= ((1 + u^2)^2 - 4*u^2)/(1+u^2)^2
= (1 + 2*u^2 + u^4 - 4*u^2)/(1+u^2)^2
= (1 - 2*u^2 + u^4)/(1+u^2)^2
= (1-u^2)^2/(1+u^2)^2

*cos(x) = (1-u^2)/(1+u^2)*
Others are easy now. For example,

tan(x) = sin(x)/cos(x)
= 2*u/(1-u^2)

Once you have substituted in for the trigonometric functions,
you should get a rational

function in terms of

*u*. This
can usually be

simplified further. However, you may next need to
go on to

partial fraction decomposition.

And remember kids, make sure you substitute back in for *u* when you are done.