The substitution: Let t = tan(x/2). Then:
- sin(x) = 2t/(1+t^2)
- cos(x) = (1-t^2)/(1+t^2)
- tan(x) = 2t/(1-t^2)
- dx = 2dt/(1+t^2)
When to use: Integrals of rational functions of sin(x) and cos(x), especially when other methods fail. The substitution converts any such integral into a rational function of t.
Example: integral dx/(1+sin x) = integral [2/(1+t^2)] / [1+2t/(1+t^2)] dt = integral 2dt/((1+t)^2) = -2/(1+t) = -2/(1+tan(x/2)) + C.
Drawback: Often produces complicated expressions. Try simpler substitutions first (like t = tan x for integral of sec x, or multiplying by conjugates).
Alternative: For integrals of type integral R(sin x, cos x) dx where R(-sin x, -cos x) = R(sin x, cos x), try t = tan x instead.