Skip to main content
Examonaut

Topic 2 · Lesson 3 of 4

The Weierstrass substitution

Integrating with t = tan(x/2)

The substitution t=tan⁡x2t = \tan\frac{x}{2} turns any rational function of sin⁡x\sin x and cos⁡x\cos x into a rational function of tt, which partial fractions or standard integrals can finish. You need dxdx in terms of dtdt:

dtdx=12sec⁡2x2=12(1+t2),sodx=21+t2 dt\frac{dt}{dx} = \frac{1}{2}\sec^2\frac{x}{2} = \frac{1}{2}(1 + t^2), \quad \text{so} \quad dx = \frac{2}{1 + t^2} \, dt

together with sin⁡x=2t1+t2\sin x = \frac{2t}{1 + t^2} and cos⁡x=1−t21+t2\cos x = \frac{1 - t^2}{1 + t^2}. Change the limits too: x=0x = 0 gives t=0t = 0, x=π2x = \frac{\pi}{2} gives t=1t = 1, x=π3x = \frac{\pi}{3} gives t=13t = \frac{1}{\sqrt{3}}.

The integrands you meet usually look like 1a+bcos⁡x\frac{1}{a + b\cos x} or 1a+bsin⁡x\frac{1}{a + b\sin x}. After the substitution the 1+t21 + t^2 cancels, leaving one over a quadratic in tt. Then:

  • a sum of squares, 1t2+k2\frac{1}{t^2 + k^2}, integrates to 1karctan⁡tk\frac{1}{k}\arctan\frac{t}{k} (complete the square first if there is a tt term);
  • a difference of squares, 1k2−t2\frac{1}{k^2 - t^2}, needs partial fractions and gives logarithms.

Worked example

An arctan result

Find the exact value of ∫0π212+cos⁡x dx\displaystyle\int_0^{\frac{\pi}{2}} \frac{1}{2 + \cos x} \, dx.

Show solution
  1. 2+cos⁡x=2(1+t2)+(1−t2)1+t2=3+t21+t22 + \cos x = \frac{2(1 + t^2) + (1 - t^2)}{1 + t^2} = \frac{3 + t^2}{1 + t^2}.
  2. The integral becomes ∫011+t23+t2×21+t2 dt=∫0123+t2 dt\int_0^1 \frac{1 + t^2}{3 + t^2} \times \frac{2}{1 + t^2} \, dt = \int_0^1 \frac{2}{3 + t^2} \, dt.
  3. =[23arctan⁡t3]01=23×π6=π33= \left[\frac{2}{\sqrt{3}}\arctan\frac{t}{\sqrt{3}}\right]_0^1 = \frac{2}{\sqrt{3}} \times \frac{\pi}{6} = \frac{\pi}{3\sqrt{3}}.

Worked example

A logarithm result

Find ∫0π214+5cos⁡x dx\displaystyle\int_0^{\frac{\pi}{2}} \frac{1}{4 + 5\cos x} \, dx.

Show solution
  1. 4+5cos⁡x=4+4t2+5−5t21+t2=9−t21+t24 + 5\cos x = \frac{4 + 4t^2 + 5 - 5t^2}{1 + t^2} = \frac{9 - t^2}{1 + t^2}, so the integral is ∫0129−t2 dt\int_0^1 \frac{2}{9 - t^2} \, dt.
  2. Partial fractions: 29−t2=13(13−t+13+t)\frac{2}{9 - t^2} = \frac{1}{3}\left(\frac{1}{3 - t} + \frac{1}{3 + t}\right).
  3. =13[ln⁡∣3+t3−t∣]01=13ln⁡2= \frac{1}{3}\left[\ln\left|\frac{3 + t}{3 - t}\right|\right]_0^1 = \frac{1}{3}\ln 2.

Here the denominator 4+5cos⁡x4 + 5\cos x is zero when cos⁡x=−45\cos x = -\frac{4}{5}, which is outside 0≤x≤π20 \leq x \leq \frac{\pi}{2}, so the integral exists. Always check that the integrand is defined over the whole interval.

Practise this topic

Both are part of Premium.