The Weierstrass substitution converts any rational function of sin x and cos x into a rational function of t, using:
$t = \tan\left(\frac{x}{2}\right)$
From this, we get:
$\sin x = \frac{2t}{1+t^2}, \quad \cos x = \frac{1-t^2}{1+t^2}, \quad dx = \frac{2}{1+t^2},dt$
Geometrically, t is the slope of a line from (−1, 0) through a point on the unit circle at angle x. As t sweeps over all real numbers, this line traces every point on the circle - a stereographic projection. This turns trigonometric expressions into rational ones, which are far easier to integrate.
It's applied to integrals of the form:
$\int R(\sin x, \cos x),dx$
where R is any rational function. After substitution, the integral reduces to a rational function of t, solvable via partial fractions.
Despite the name, the substitution wasn't discovered by Karl Weierstrass (1815–1897). It appears in 19th-century calculus texts as a standard technique, and the "Weierstrass" label seems to have stuck later, possibly because it appeared in his lecture notes or was popularized through textbooks referencing his work. Its true origins are murkier than the name suggests - it's sometimes just called the "tangent half-angle substitution."