← 2026 Paper 2

UPSC 2026 Maths Optional Paper 2 Q2c — Step-by-Step Solution

20 marks · Section A

Contour integration of real integrals using residues · Complex Analysis · asked 10× in 14 yrs · Read the full method →

Question

Use the method of contour integration to prove

∫02πsin⁡2θa+bcos⁡θ dθ=2πb2{a−a2−b2},if a>b>0.\int_{0}^{2\pi} \frac{\sin^2\theta}{a + b\cos\theta}\,d\theta = \frac{2\pi}{b^2}\left\{a - \sqrt{a^2 - b^2}\right\},\qquad \text{if } a > b > 0.

Technique

A rational function of sin⁡θ,cos⁡θ\sin\theta,\cos\theta integrated over a full period [0,2π][0,2\pi] is the standard signature for the unit-circle substitution z=eiθz=e^{i\theta}: the integral becomes a contour integral of a rational function of zz round ∣z∣=1|z|=1, and the residue theorem finishes it. Two things carry the marks here. First, sin⁡2θ\sin^{2}\theta contributes z2z^{2} to the denominator while the factor 1a+bcos⁡θ\dfrac{1}{a+b\cos\theta} contributes a zz to the numerator and dθd\theta contributes another zz to the denominator — the net singularity at the origin is a double pole, not a simple or a triple one, and the residue there must be computed by differentiation. Second, of the two roots of bz2+2az+b=0bz^{2}+2az+b=0 exactly one lies inside ∣z∣=1|z|=1, and the hypothesis a>b>0a>b>0 is precisely what guarantees this.

Figure to draw (small, 4 cm, and it earns its space): the unit circle ∣z∣=1|z|=1 with a counter-clockwise arrow; a marked point at the origin labelled ”z=0z=0, pole of order 22”; a point on the negative real axis inside the circle labelled α=−a+a2−b2b\alpha=\dfrac{-a+\sqrt{a^{2}-b^{2}}}{b}, and a point on the negative real axis outside labelled β=−a−a2−b2b\beta=\dfrac{-a-\sqrt{a^{2}-b^{2}}}{b}, with the annotation αβ=1\alpha\beta=1. That one figure states the pole inventory, the orientation, and the inside/outside decision — the three things Step 4 has to justify.

Solution

Throughout, a>b>0a>b>0 are real and a2−b2\sqrt{a^{2}-b^{2}} denotes the positive square root; note 0<a2−b2<a0<\sqrt{a^{2}-b^{2}}<a.

Step 1 — The integral is proper (one line, but it is a hypothesis check).

For all real θ\theta, cos⁡θ≥−1\cos\theta\ge-1, so

a+bcos⁡θ ≥ a−b > 0.a+b\cos\theta\ \ge\ a-b\ >\ 0 .

Hence the denominator never vanishes, the integrand is continuous on [0,2π][0,2\pi], and I=∫02πsin⁡2θa+bcos⁡θ dθI=\displaystyle\int_{0}^{2\pi}\frac{\sin^{2}\theta}{a+b\cos\theta}\,d\theta is an ordinary Riemann integral. (This is the first place a>ba>b is used.)

Step 2 — Substitute z=eiθz=e^{i\theta} and convert to a contour integral.

Let z=eiθz=e^{i\theta}, θ:0→2π\theta:0\to2\pi. Then zz traverses the unit circle C:∣z∣=1C:|z|=1 once, counter-clockwise (positive orientation), and

dz=ieiθdθ=iz dθ ⟹ dθ=dziz,dz=ie^{i\theta}d\theta=iz\,d\theta\ \Longrightarrow\ d\theta=\frac{dz}{iz}, cos⁡θ=z+z−12,sin⁡θ=z−z−12i.\cos\theta=\frac{z+z^{-1}}{2},\qquad \sin\theta=\frac{z-z^{-1}}{2i}.

Therefore

sin⁡2θ=(z−z−1)2(2i)2=−(z−z−1)24=−(z2−1)24z2,(2.1)\sin^{2}\theta=\frac{(z-z^{-1})^{2}}{(2i)^{2}}=-\frac{(z-z^{-1})^{2}}{4}=-\frac{(z^{2}-1)^{2}}{4z^{2}}, \tag{2.1} a+bcos⁡θ=a+b2(z+1z)=bz2+2az+b2z ⟹ 1a+bcos⁡θ=2zbz2+2az+b.(2.2)a+b\cos\theta=a+\frac{b}{2}\Bigl(z+\frac1z\Bigr)=\frac{bz^{2}+2az+b}{2z}\ \Longrightarrow\ \frac{1}{a+b\cos\theta}=\frac{2z}{bz^{2}+2az+b}. \tag{2.2}

Step 3 — Assemble, and read off the order of the pole at the origin.

Multiply (2.1)(2.1), (2.2)(2.2) and dθ=dzizd\theta=\dfrac{dz}{iz}:

sin⁡2θa+bcos⁡θ dθ=[−(z2−1)24z2]⋅[2zbz2+2az+b]⋅dziz=−2z (z2−1)24i z3 (bz2+2az+b) dz.\frac{\sin^{2}\theta}{a+b\cos\theta}\,d\theta =\left[-\frac{(z^{2}-1)^{2}}{4z^{2}}\right]\cdot\left[\frac{2z}{bz^{2}+2az+b}\right]\cdot\frac{dz}{iz} =-\frac{2z\,(z^{2}-1)^{2}}{4i\,z^{3}\,(bz^{2}+2az+b)}\,dz .

One power of zz cancels:

sin⁡2θa+bcos⁡θ dθ=−(z2−1)22i z2 (bz2+2az+b) dz.\frac{\sin^{2}\theta}{a+b\cos\theta}\,d\theta=-\frac{(z^{2}-1)^{2}}{2i\,z^{2}\,(bz^{2}+2az+b)}\,dz .

Since 1i=−i\dfrac{1}{i}=-i, we have −12i=i2-\dfrac{1}{2i}=\dfrac{i}{2}, so

 I=i2∮Cg(z) dz,g(z)=(z2−1)2z2 (bz2+2az+b). (3.1)\boxed{\ I=\frac{i}{2}\oint_{C} g(z)\,dz,\qquad g(z)=\frac{(z^{2}-1)^{2}}{z^{2}\,(bz^{2}+2az+b)}.\ } \tag{3.1}

The order of the pole at z=0z=0 — do the bookkeeping out loud. Three factors contribute powers of zz at the origin: sin⁡2θ\sin^{2}\theta gives z−2z^{-2}, the substitution dθ=dz/(iz)d\theta=dz/(iz) gives z−1z^{-1}, and 1a+bcos⁡θ=2zbz2+2az+b\dfrac{1}{a+b\cos\theta}=\dfrac{2z}{bz^{2}+2az+b} gives z+1z^{+1}. Net: z−2z^{-2}. Concretely, in gg the numerator satisfies (z2−1)2∣z=0=1≠0(z^{2}-1)^{2}\big|_{z=0}=1\neq0 and the factor bz2+2az+bbz^{2}+2az+b takes the value b≠0b\neq0 at z=0z=0; hence

z=0 is a pole of g of order exactly 2.z=0 \text{ is a pole of } g \text{ of order exactly } 2 .

(Trap: dropping the numerator zz of (2.2)(2.2) leaves z3z^{3} downstairs and a spurious third-order pole; writing sin⁡2θ=1−cos⁡2θ\sin^{2}\theta=1-\cos^{2}\theta and reducing carelessly can instead leave a simple pole. Either error changes the residue at 00 and silently destroys the answer, so the cancellation above is written out rather than done mentally.)

Step 4 — The other poles: locate them and decide inside/outside.

bz2+2az+b=0 ⟹ z=−2a±4a2−4b22b=−a±a2−b2b.bz^{2}+2az+b=0\ \Longrightarrow\ z=\frac{-2a\pm\sqrt{4a^{2}-4b^{2}}}{2b}=\frac{-a\pm\sqrt{a^{2}-b^{2}}}{b}.

Write

α=−a+a2−b2b,β=−a−a2−b2b.\alpha=\frac{-a+\sqrt{a^{2}-b^{2}}}{b},\qquad \beta=\frac{-a-\sqrt{a^{2}-b^{2}}}{b}.

Because a>b>0a>b>0 we have a2−b2>0a^{2}-b^{2}>0, so α,β\alpha,\beta are real and distinct; both are negative, and

αβ=bb=1,α+β=−2ab(4.1)\alpha\beta=\frac{b}{b}=1,\qquad \alpha+\beta=-\frac{2a}{b} \tag{4.1}

(product and sum of the roots of bz2+2az+b=0bz^{2}+2az+b=0).

Which one is inside CC? With d=a2−b2∈(0,a)d=\sqrt{a^{2}-b^{2}}\in(0,a) we have ∣α∣=a−db|\alpha|=\dfrac{a-d}{b}, and

∣α∣<1  ⟺  a−d<b  ⟺  a−b<d.|\alpha|<1\iff a-d<b\iff a-b<d .

Both sides are positive (a−b>0a-b>0 by hypothesis, d>0d>0), so we may square:

(a−b)2<d2=a2−b2=(a−b)(a+b)  ⟺  a−b<a+b  ⟺  0<2b,(a-b)^{2}<d^{2}=a^{2}-b^{2}=(a-b)(a+b)\iff a-b<a+b\iff 0<2b,

which is true. Hence

∣α∣<1.(4.2)|\alpha|<1 . \tag{4.2}

By (4.1)(4.1), ∣β∣=1∣α∣>1|\beta|=\dfrac{1}{|\alpha|}>1, so β\beta lies outside CC. In particular no pole lies on CC, so the residue theorem applies. (This is the second, decisive use of a>ba>b: if a=ba=b then d=0d=0 and α=β=−1\alpha=\beta=-1 sits on the contour.)

So inside CC the function gg has exactly two poles: a double pole at z=0z=0 and a simple pole at z=αz=\alpha (simple because α≠β\alpha\neq\beta and α≠0\alpha\neq0, the latter since d<ad<a).

Factorising the quadratic,

g(z)=(z2−1)2b z2 (z−α)(z−β).(4.3)g(z)=\frac{(z^{2}-1)^{2}}{b\,z^{2}\,(z-\alpha)(z-\beta)} . \tag{4.3}

Step 5 — Residue at the double pole z=0z=0.

For a pole of order 22,  Res⁡z=0g=1(2−1)!lim⁡z→0ddz[z2g(z)]\ \operatorname*{Res}_{z=0}g=\dfrac{1}{(2-1)!}\displaystyle\lim_{z\to0}\frac{d}{dz}\bigl[z^{2}g(z)\bigr]. Here

z2g(z)=(z2−1)2bz2+2az+b=N(z)D(z),N(z)=(z2−1)2, D(z)=bz2+2az+b.z^{2}g(z)=\frac{(z^{2}-1)^{2}}{bz^{2}+2az+b}=\frac{N(z)}{D(z)},\qquad N(z)=(z^{2}-1)^{2},\ D(z)=bz^{2}+2az+b.

Then N(0)=1N(0)=1, N′(z)=4z(z2−1)N'(z)=4z(z^{2}-1) so N′(0)=0N'(0)=0; D(0)=bD(0)=b, D′(z)=2bz+2aD'(z)=2bz+2a so D′(0)=2aD'(0)=2a. By the quotient rule,

Res⁡z=0g=N′(0)D(0)−N(0)D′(0)D(0)2=0⋅b−1⋅2ab2=−2ab2.(5.1)\operatorname*{Res}_{z=0}g=\frac{N'(0)D(0)-N(0)D'(0)}{D(0)^{2}}=\frac{0\cdot b-1\cdot 2a}{b^{2}}=-\frac{2a}{b^{2}} . \tag{5.1}

Cross-check by Taylor expansion (the residue is the coefficient of z1z^{1} in z2g(z)z^{2}g(z)):

(z2−1)2=1−2z2+z4,1b+2az+bz2=1b(1−2abz+O(z2)),(z^{2}-1)^{2}=1-2z^{2}+z^{4},\qquad \frac{1}{b+2az+bz^{2}}=\frac1b\Bigl(1-\frac{2a}{b}z+O(z^{2})\Bigr),

so z2g(z)=1b−2ab2z+O(z2)z^{2}g(z)=\dfrac1b-\dfrac{2a}{b^{2}}z+O(z^{2}), giving the same −2ab2-\dfrac{2a}{b^{2}}. ✓

Step 6 — Residue at the simple pole z=αz=\alpha.

From (4.3)(4.3),

Res⁡z=αg=lim⁡z→α(z−α)g(z)=(α2−1)2b α2 (α−β).\operatorname*{Res}_{z=\alpha}g=\lim_{z\to\alpha}(z-\alpha)g(z)=\frac{(\alpha^{2}-1)^{2}}{b\,\alpha^{2}\,(\alpha-\beta)} .

Evaluate the three ingredients with d=a2−b2d=\sqrt{a^{2}-b^{2}}, so that α=d−ab\alpha=\dfrac{d-a}{b} and α2=(a−d)2b2\alpha^{2}=\dfrac{(a-d)^{2}}{b^{2}}:

(i) α−β=(−a+d)−(−a−d)b=2db\displaystyle \alpha-\beta=\frac{(-a+d)-(-a-d)}{b}=\frac{2d}{b}.

(ii) Using d2=a2−b2d^{2}=a^{2}-b^{2},

(a−d)2−b2=a2−2ad+d2−b2=(a2−b2)+d2−2ad=2d2−2ad=−2d (a−d),(a-d)^{2}-b^{2}=a^{2}-2ad+d^{2}-b^{2}=\bigl(a^{2}-b^{2}\bigr)+d^{2}-2ad=2d^{2}-2ad=-2d\,(a-d),

hence

α2−1=(a−d)2−b2b2=−2d (a−d)b2,(α2−1)2=4d2(a−d)2b4.\alpha^{2}-1=\frac{(a-d)^{2}-b^{2}}{b^{2}}=-\frac{2d\,(a-d)}{b^{2}},\qquad (\alpha^{2}-1)^{2}=\frac{4d^{2}(a-d)^{2}}{b^{4}} .

(iii) b α2(α−β)=b⋅(a−d)2b2⋅2db=2d (a−d)2b2\displaystyle b\,\alpha^{2}(\alpha-\beta)=b\cdot\frac{(a-d)^{2}}{b^{2}}\cdot\frac{2d}{b}=\frac{2d\,(a-d)^{2}}{b^{2}} (non-zero, since d>0d>0 and a≠da\ne d).

Dividing, the factor (a−d)2(a-d)^{2} cancels:

Res⁡z=αg=4d2(a−d)2/b42d(a−d)2/b2=4d2b4⋅b22d=2db2=2a2−b2b2.(6.1)\operatorname*{Res}_{z=\alpha}g=\frac{4d^{2}(a-d)^{2}/b^{4}}{2d(a-d)^{2}/b^{2}}=\frac{4d^{2}}{b^{4}}\cdot\frac{b^{2}}{2d}=\frac{2d}{b^{2}}=\frac{2\sqrt{a^{2}-b^{2}}}{b^{2}} . \tag{6.1}

Step 7 — Apply Cauchy’s Residue Theorem and assemble.

gg is analytic on and inside CC except at z=0z=0 and z=αz=\alpha, both interior (Step 4), and has no singularity on CC. By Cauchy’s residue theorem, for the positively oriented CC,

∮Cg(z) dz=2πi[Res⁡z=0g+Res⁡z=αg]=2πi[−2ab2+2db2]=2πi⋅−2(a−d)b2=−4πi (a−d)b2.\oint_{C}g(z)\,dz=2\pi i\left[\operatorname*{Res}_{z=0}g+\operatorname*{Res}_{z=\alpha}g\right] =2\pi i\left[-\frac{2a}{b^{2}}+\frac{2d}{b^{2}}\right]=2\pi i\cdot\frac{-2(a-d)}{b^{2}}=-\frac{4\pi i\,(a-d)}{b^{2}} .

Substituting into (3.1)(3.1) and using i2=−1i^{2}=-1:

I=i2⋅(−4πi(a−d)b2)=−2πi2(a−d)b2=2π (a−d)b2.I=\frac{i}{2}\cdot\left(-\frac{4\pi i(a-d)}{b^{2}}\right)=-\frac{2\pi i^{2}(a-d)}{b^{2}}=\frac{2\pi\,(a-d)}{b^{2}} .

That is,

∫02πsin⁡2θa+bcos⁡θ dθ=2πb2{a−a2−b2},a>b>0.■\int_{0}^{2\pi}\frac{\sin^{2}\theta}{a+b\cos\theta}\,d\theta=\frac{2\pi}{b^{2}}\Bigl\{a-\sqrt{a^{2}-b^{2}}\Bigr\},\qquad a>b>0.\qquad\blacksquare

Step 8 — Two sanity checks worth one line each.

(i) Positivity. Since a2−b2<a\sqrt{a^{2}-b^{2}}<a, the right side is positive — as it must be, the integrand being ≥0\ge0 with a+bcos⁡θ>0a+b\cos\theta>0.

(ii) The b→0+b\to0^{+} degeneration. a2−b2=a1−b2/a2=a−b22a+O(b4)\sqrt{a^{2}-b^{2}}=a\sqrt{1-b^{2}/a^{2}}=a-\dfrac{b^{2}}{2a}+O(b^{4}), so

2πb2(a−a2−b2)=2πb2(b22a+O(b4))=πa+O(b2) →b→0+ πa,\frac{2\pi}{b^{2}}\bigl(a-\sqrt{a^{2}-b^{2}}\bigr)=\frac{2\pi}{b^{2}}\left(\frac{b^{2}}{2a}+O(b^{4})\right)=\frac{\pi}{a}+O(b^{2})\ \xrightarrow[b\to0^{+}]{}\ \frac{\pi}{a},

which agrees with the direct evaluation ∫02πsin⁡2θa dθ=1a⋅π=πa\displaystyle\int_{0}^{2\pi}\frac{\sin^{2}\theta}{a}\,d\theta=\frac{1}{a}\cdot\pi=\frac{\pi}{a}. ✓ The apparent 1/b21/b^{2} blow-up of the stated formula is therefore removable, not a defect.

Answer

  ∫02πsin⁡2θa+bcos⁡θ dθ=2πb2{a−a2−b2}(a>b>0),  \boxed{\;\int_{0}^{2\pi}\frac{\sin^{2}\theta}{a+b\cos\theta}\,d\theta=\frac{2\pi}{b^{2}}\Bigl\{a-\sqrt{a^{2}-b^{2}}\Bigr\}\qquad(a>b>0),\;}

obtained from I=i2∮∣z∣=1(z2−1)2 dzz2(bz2+2az+b)I=\dfrac{i}{2}\displaystyle\oint_{|z|=1}\frac{(z^{2}-1)^{2}\,dz}{z^{2}(bz^{2}+2az+b)} with Res⁡z=0=−2ab2\operatorname*{Res}_{z=0}=-\dfrac{2a}{b^{2}} (double pole) and Res⁡z=α=2a2−b2b2\operatorname*{Res}_{z=\alpha}=\dfrac{2\sqrt{a^{2}-b^{2}}}{b^{2}}, α=−a+a2−b2b\alpha=\dfrac{-a+\sqrt{a^{2}-b^{2}}}{b} being the only root of bz2+2az+bbz^{2}+2az+b inside ∣z∣=1|z|=1.

We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 14 years, mapped. Get the take-away PDF free.