← Back to all lessons
Class 12Calculus11:00Published 8 Jan 2025

Definite Integral of x over a squared cos squared x plus b squared sin squared x

Evaluate the definite integral of x divided by a squared cosine squared x plus b squared sine squared x from 0 to pi, the last and most important question of the miscellaneous exercise.

This Class 12 lesson works through a high-mark CBSE and state board integration question step by step. It uses the property that replaces x with pi minus x to remove the x in the numerator, then splits the interval and substitutes tan x and cot x to finish. The lesson ends with the clean closed-form result pi squared over 2ab.

What you'll learn

  • Using the king property that replaces x with pi minus x to eliminate the variable from the numerator
  • Reducing the limits using the even-function property over a symmetric interval
  • Splitting the integral at pi over four and substituting tangent and cotangent to integrate each piece

Lesson chapters

0:00The question and the plan
0:22Replacing x with pi minus x
1:48Halving the limits to 0 to pi over 2
3:05Splitting at pi over 4 into I1 and I2
4:20First piece: substitute tan x
6:35Second piece: substitute cot x
9:30Combining to get pi squared over 2ab

Lesson notes

This lesson evaluates the definite integral

I=∫0πx dxa2cos⁡2x+b2sin⁡2x.I = \int_0^{\pi} \frac{x\,dx}{a^2\cos^2 x + b^2\sin^2 x}.

It is the last question of the miscellaneous exercise and a frequently asked high-mark question. The idea is to first remove the xx in the numerator using a symmetry property, then reduce the limits and finish with two standard substitutions.

Removing the x with the king property

Apply ∫0af(x) dx=∫0af(a−x) dx\displaystyle\int_0^{a} f(x)\,dx = \int_0^{a} f(a-x)\,dx with a=πa = \pi. Since cos⁡2(π−x)=cos⁡2x\cos^2(\pi - x) = \cos^2 x and sin⁡2(π−x)=sin⁡2x\sin^2(\pi - x) = \sin^2 x, the denominator is unchanged, so

I=∫0π(π−x) dxa2cos⁡2x+b2sin⁡2x.I = \int_0^{\pi} \frac{(\pi - x)\,dx}{a^2\cos^2 x + b^2\sin^2 x}.

Split the numerator into π\pi and −x-x:

I=π∫0πdxa2cos⁡2x+b2sin⁡2x−I.I = \pi\int_0^{\pi} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x} - I.

The second term is the original integral II. Transposing it to the left gives

2I=π∫0πdxa2cos⁡2x+b2sin⁡2x.2I = \pi\int_0^{\pi} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x}.

Halving the limits

Let f(x)=1a2cos⁡2x+b2sin⁡2xf(x) = \dfrac{1}{a^2\cos^2 x + b^2\sin^2 x}. Because f(π−x)=f(x)f(\pi - x) = f(x), the property ∫02af(x) dx=2∫0af(x) dx\displaystyle\int_0^{2a} f(x)\,dx = 2\int_0^{a} f(x)\,dx applies (here 2a=π2a = \pi, so a=π2a = \tfrac{\pi}{2}):

2I=π⋅2∫0π/2dxa2cos⁡2x+b2sin⁡2x,2I = \pi \cdot 2\int_0^{\pi/2} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x},

so

I=π∫0π/2dxa2cos⁡2x+b2sin⁡2x.I = \pi\int_0^{\pi/2} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x}.

Splitting at pi over 4

Use ∫ab=∫ac+∫cb\displaystyle\int_a^{b} = \int_a^{c} + \int_c^{b} with c=π4c = \tfrac{\pi}{4}, writing I=I1+I2I = I_1 + I_2 where

I1=π∫0π/4dxa2cos⁡2x+b2sin⁡2x,I2=π∫π/4π/2dxa2cos⁡2x+b2sin⁡2x.I_1 = \pi\int_0^{\pi/4} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x}, \qquad I_2 = \pi\int_{\pi/4}^{\pi/2} \frac{dx}{a^2\cos^2 x + b^2\sin^2 x}.

First piece: substitute tan x

Divide numerator and denominator of I1I_1 by cos⁡2x\cos^2 x:

I1=π∫0π/4sec⁡2x dxa2+b2tan⁡2x.I_1 = \pi\int_0^{\pi/4} \frac{\sec^2 x\,dx}{a^2 + b^2\tan^2 x}.

Put t=tan⁡xt = \tan x, so dt=sec⁡2x dxdt = \sec^2 x\,dx. The limits become t=0t = 0 at x=0x = 0 and t=1t = 1 at x=π4x = \tfrac{\pi}{4}:

I1=π∫01dta2+b2t2=πb2∫01dt(ab)2+t2.I_1 = \pi\int_0^{1} \frac{dt}{a^2 + b^2 t^2} = \frac{\pi}{b^2}\int_0^{1} \frac{dt}{\left(\tfrac{a}{b}\right)^2 + t^2}.

Using ∫dtp2+t2=1ptan⁡−1tp\displaystyle\int \frac{dt}{p^2 + t^2} = \tfrac{1}{p}\tan^{-1}\tfrac{t}{p} with p=abp = \tfrac{a}{b}:

I1=πb2⋅ba[tan⁡−1bta]01=πabtan⁡−1ba.I_1 = \frac{\pi}{b^2}\cdot\frac{b}{a}\Big[\tan^{-1}\tfrac{bt}{a}\Big]_0^{1} = \frac{\pi}{ab}\tan^{-1}\frac{b}{a}.

Second piece: substitute cot x

For I2I_2, divide numerator and denominator by sin⁡2x\sin^2 x:

I2=π∫π/4π/2csc⁡2x dxa2cot⁡2x+b2.I_2 = \pi\int_{\pi/4}^{\pi/2} \frac{\csc^2 x\,dx}{a^2\cot^2 x + b^2}.

Put u=cot⁡xu = \cot x, so −csc⁡2x dx=du-\csc^2 x\,dx = du. The limits become u=1u = 1 at x=π4x = \tfrac{\pi}{4} and u=0u = 0 at x=π2x = \tfrac{\pi}{2}. The minus sign and the swap of limits cancel:

I2=π∫01dua2u2+b2=πa2∫01duu2+(ba)2.I_2 = \pi\int_0^{1} \frac{du}{a^2 u^2 + b^2} = \frac{\pi}{a^2}\int_0^{1} \frac{du}{u^2 + \left(\tfrac{b}{a}\right)^2}.

With p=bap = \tfrac{b}{a}:

I2=πa2⋅ab[tan⁡−1aub]01=πabtan⁡−1ab.I_2 = \frac{\pi}{a^2}\cdot\frac{a}{b}\Big[\tan^{-1}\tfrac{au}{b}\Big]_0^{1} = \frac{\pi}{ab}\tan^{-1}\frac{a}{b}.

Combining the pieces

Add the two results:

I=I1+I2=πab(tan⁡−1ba+tan⁡−1ab).I = I_1 + I_2 = \frac{\pi}{ab}\left(\tan^{-1}\frac{b}{a} + \tan^{-1}\frac{a}{b}\right).

Since tan⁡−1ba=cot⁡−1ab\tan^{-1}\tfrac{b}{a} = \cot^{-1}\tfrac{a}{b}, this becomes

I=πab(cot⁡−1ab+tan⁡−1ab).I = \frac{\pi}{ab}\left(\cot^{-1}\frac{a}{b} + \tan^{-1}\frac{a}{b}\right).

Using tan⁡−1θ+cot⁡−1θ=π2\tan^{-1}\theta + \cot^{-1}\theta = \tfrac{\pi}{2}:

I=πab⋅π2=π22ab.I = \frac{\pi}{ab}\cdot\frac{\pi}{2} = \frac{\pi^2}{2ab}.

Key takeaways

  • Replacing xx with π−x\pi - x turns the xx in the numerator into a copy of II, which you transpose to solve for II.
  • Because the remaining integrand is even about π2\tfrac{\pi}{2}, the limits halve to 00 to π2\tfrac{\pi}{2}.
  • Splitting at π4\tfrac{\pi}{4} and substituting tan⁡x\tan x and cot⁡x\cot x gives two inverse-tangent terms whose sum collapses to π22ab\dfrac{\pi^2}{2ab}.