Why Use the Half-Angle Parameter?
Some integrals involve sine and cosine in a rational combination: a quotient of polynomials in \(\sin x\) and \(\cos x\), for example. The substitution \(t=\tan(x/2)\) converts both trigonometric functions, as well as the differential \(dx\), into rational expressions in \(t\). The resulting integral is therefore a rational-function integral.
The method is powerful, but it is not valid as one global change of variable across the entire real line. The tangent function has poles, so the substitution must be used on suitable intervals. This matters especially for definite integrals whose interval crosses one of those poles.
Deriving the Conversion Formulas
Set \(u=x/2\), so that \(t=\tan u\). The double-angle identities give \(\sin x=2\sin u\cos u\) and \(\cos x=\cos^2u-\sin^2u\). Since \(\tan u=t\), we can write \(\sin u=t\cos u\). Using \(\sin^2u+\cos^2u=1\), we obtain \((1+t^2)\cos^2u=1\). Substitution into the double-angle identities gives the formulas for sine and cosine.
For the differential, differentiate \(t=\tan(x/2)\) with respect to \(x\):
Since this derivative is positive wherever \(t\) is defined, we can solve for \(dx\):
The factor of \(2\) is essential. Omitting it changes the value of the integral.
When the Substitution Produces a Rational Integral
Suppose the integrand is a rational expression in \(\sin x\) and \(\cos x\), and suppose its denominator is nonzero on the interval being considered. Replacing each sine and cosine by its formula in \(t\) gives rational expressions in \(t\). Multiplying by \(dx=2\,dt/(1+t^2)\) leaves a rational function of \(t\), which can be integrated by the standard methods for rational functions.
This applies to expressions such as \(P(\sin x,\cos x)/Q(\sin x,\cos x)\), where \(P\) and \(Q\) are polynomials and \(Q(\sin x,\cos x)\ne 0\) on the interval. It does not assert that every trigonometric integrand becomes rational: expressions involving, for example, \(e^{\sin x}\) do not become rational functions of \(t\) under this substitution.
Work on an interval where \(t=\tan(x/2)\) is defined and the original integrand has no singularity.
Replace \(\sin x\), \(\cos x\), and \(dx\), including the factor \(2\) in the differential.
Use an appropriate method for the resulting rational function.
Keep the interval restrictions in mind, and differentiate the resulting expression with respect to \(x\) to verify it.
The Intervals of Validity
The function \(t=\tan(x/2)\) is undefined when \(x=(2k+1)\pi\), where \(k\) is an integer. On each interval \(I_k=((2k-1)\pi,(2k+1)\pi)\), it is defined, strictly increasing, and takes every real value exactly once. Its inverse on that interval is \(x=2\arctan t+2k\pi\), where \(\arctan t\) takes values in \((-\pi/2,\pi/2)\).
Consequently, an antiderivative obtained in \(t\) gives an antiderivative in \(x\) on each appropriate connected interval. The constants of integration can differ on distinct intervals. If a definite integral crosses a point where \(t\) is undefined, split the interval there and use limits at the split. The original integrand may still be continuous at that point; the pole may belong to the substitution rather than to the integrand.
Worked Example: Integrating a Reciprocal Linear Expression in Cosine
Find an antiderivative of \(1/(2+\cos x)\) on the interval \((-\pi,\pi)\). This interval avoids the pole of \(t=\tan(x/2)\), and \(2+\cos x\) is positive throughout it.
Substitute the cosine formula into the denominator:
Now substitute the differential. The factors \(1+t^2\) cancel:
Using \(\int du/(u^2+a^2)=(1/a)\arctan(u/a)+C\), with \(a=\sqrt{3}\), gives
To check, write \(F(x)\) for the final expression. Since \(dt/dx=(1+t^2)/2\), the chain rule gives
The derivative agrees with the integrand, as required.
Worked Example: A Quotient of Sine and One Plus Cosine
Find an antiderivative of \(\sin x/(1+\cos x)\) on \((-\pi,\pi)\). The denominator is nonzero in this open interval, so the integrand is defined there.
In terms of \(t\), the quotient simplifies:
Including the differential, the integral becomes
Thus one antiderivative on the stated interval is \(\ln\!\bigl(1+\tan^2(x/2)\bigr)+C\). To check it, differentiate with \(t=\tan(x/2)\):
This verifies the result wherever the substitution and integrand are defined.
A Definite Integral That Crosses a Substitution Pole
The interval restriction is particularly visible when a definite integral crosses \(x=\pi\). At that point \(t\) is undefined, even though an integrand such as \(1/(3+2\cos x)\) is finite. Splitting the integral lets us use the substitution on each side separately.
Worked Example: Integrating Across \(x=\pi\)
Evaluate \(\int_0^{2\pi} dx/(3+2\cos x)\). The denominator is positive, since \(3+2\cos x\ge 1\), so the integral is proper in \(x\). Split it at \(x=\pi\), where the substitution has a pole.
Under the substitution, the denominator becomes
Hence the transformed integrand on each interval is \(2\,dt/(t^2+5)\). On \(0\le x<\pi\), \(t\) runs from \(0\) to \(+\infty\). Therefore
On \(\pi<x\le 2\pi\), \(t\) runs from \(-\infty\) to \(0\). Thus
Adding the two parts gives \(\int_0^{2\pi} dx/(3+2\cos x)=2\pi/\sqrt{5}\). The limits at infinity are necessary because \(t\) is unbounded as \(x\) approaches \(\pi\) from either side. The two transformed intervals are kept separate rather than treating \(t\) as a single coordinate through its pole.
A Common Mistake: Losing the Factor of Two
A frequent error is to use \(dx=dt/(1+t^2)\). But differentiating \(t=\tan(x/2)\) gives \(dt/dx=(1+t^2)/2\), so the correct formula is \(dx=2\,dt/(1+t^2)\).
For instance, in the first worked example, omitting the factor of \(2\) would give the incorrect result \(\frac{1}{\sqrt{3}}\arctan(t/\sqrt{3})\). Differentiating this with respect to \(x\) yields
This is half the required integrand. The corrected coefficient \(2/\sqrt{3}\) makes the derivative \(1/(2+\cos x)\), as the direct check showed.
When the Method Is Useful
The half-angle substitution is a general route from rational trigonometric expressions to rational functions. It is especially useful when sine and cosine occur together and neither has a simple odd-power factor that makes a direct substitution natural. Once the integral is rational in \(t\), familiar algebraic techniques can be applied.
The method also demands care about domains. Before substituting, identify where the original integrand is defined and where \(t\) is defined. For an antiderivative, work on a connected interval satisfying both conditions. For a definite integral crossing a pole of \(t\), split the interval and take the appropriate one-sided limits. Finally, check the answer by differentiating with \(dt/dx=(1+t^2)/2\); this check often catches a missing factor or an interval error.
Check Your Understanding
Try these questions using the conversion formulas and interval conditions from the tutorial.
- Derive \(dx=2\,dt/(1+t^2)\) by differentiating \(t=\tan(x/2)\).
- What rational function of \(t\) results from substituting into \(\int dx/(1-\cos x)\), and on what points is the original integrand undefined?
- Why does an antiderivative obtained from \(t=\tan(x/2)\) need an interval of validity?
- When evaluating a definite integral from \(0\) to \(2\pi\), why might it be necessary to split at \(x=\pi\)?
- What incorrect derivative results if the factor of \(2\) is omitted from the transformed differential?