On this page
Integrals such as ∫ dx/(5 + 4 cos x) look like they need a trick nobody taught you. They need only one substitution, after which the problem becomes one of the standard forms in your textbook. This post gives the substitution, the three cases it leads to, worked examples with checks, and the definite-integral trap that catches strong students.
Where is this in the syllabus?
The JEE (Main) 2026 syllabus lists "Integration by substitution, by parts and by partial fractions" and "Integration using trigonometric identities"; the JEE (Advanced) 2026 brochure lists integration "by the methods of substitution and partial fractions". The NCERT Class 12 chapter Integrals (2026-27 reprint) teaches substitution in section 7.3.1 and gives the standard forms in section 7.4, including ∫ dx/(x² + a²) = (1/a) tan⁻¹(x/a) and ∫ dx/(a² − x²) = (1/2a) log|(a + x)/(a − x)|. NCERT does not list 1/(a + b cos x) as a form of its own, so treat it as a substitution exercise. Check your year's syllabus.
What does t = tan(x/2) do?
From the double-angle identities, with t = tan(x/2):
cos x = (1 − t²)/(1 + t²)
sin x = 2t/(1 + t²)
dt = (1/2) sec²(x/2) dx = (1/2)(1 + t²) dx, so dx = 2 dt/(1 + t²)
Substitute into 1/(a + b cos x) and multiply top and bottom by (1 + t²):
∫ dx/(a + b cos x) = ∫ 2 dt / [(a + b) + (a − b)t²]
Everything now depends on the signs of a + b and a − b.
Worked example 1: a > |b|
Find ∫ dx/(5 + 4 cos x).
Here a + b = 9 and a − b = 1, so the integral is ∫ 2 dt/(9 + t²).
Standard form with a = 3: 2 × (1/3) tan⁻¹(t/3) = (2/3) tan⁻¹((1/3) tan(x/2)) + C.
Check by differentiating. At x = 1.1, the derivative of the answer equals 0.14675, and 1/(5 + 4 cos 1.1) is also 0.14675. Checking at one value of x will not prove the answer, but it catches almost every slip.
In general, for a > |b|: ∫ dx/(a + b cos x) = [2/√(a² − b²)] tan⁻¹(√((a − b)/(a + b)) tan(x/2)) + C.
Worked example 2: |b| > a
Find ∫ dx/(3 + 5 cos x).
a + b = 8 and a − b = −2, so the integral is ∫ 2 dt/(8 − 2t²) = ∫ dt/(4 − t²).
Standard form with a = 2: (1/4) log|(2 + t)/(2 − t)| + C = (1/4) log|(2 + tan(x/2))/(2 − tan(x/2))| + C.
The answer blows up where tan(x/2) = 2, which is where cos x = −3/5 and the original denominator 3 + 5 cos x is zero. The integrand itself is undefined there, so that is a good sign, not an error.
Worked example 3: a = b
∫ dx/(1 + cos x). Use 1 + cos x = 2 cos²(x/2): the integrand is (1/2) sec²(x/2), so the integral is tan(x/2) + C. The general method gives ∫ 2 dt/2 = t, the same answer. When a = b, the identity is quicker.
What goes wrong with definite integrals?
Try ∫ from 0 to 2π of dx/(5 + 4 cos x). Put the limits straight into (2/3) tan⁻¹((1/3) tan(x/2)): at both 0 and 2π, tan(x/2) = 0, so you get 0. But the integrand is always positive, so the area cannot be zero.
The problem is that tan(x/2) jumps from +∞ to −∞ at x = π, and the antiderivative jumps with it. The fix is to split the interval at π, or use symmetry:
The integrand is symmetric about x = π, so the integral is 2 × ∫ from 0 to π.
From 0 to π, t runs from 0 to ∞, giving (2/3)(π/2 − 0) = π/3.
The full integral is 2π/3 ≈ 2.094. A numerical check with the trapezium rule gives the same value.
The general result for a > |b| is ∫ from 0 to 2π of dx/(a + b cos x) = 2π/√(a² − b²). With a = 5 and b = 4, that is 2π/3, as found.
A second check: ∫ from 0 to π of dx/(2 + cos x). Here the integral is ∫ from 0 to ∞ of 2 dt/(3 + t²) = (2/√3)(π/2) = π/√3 ≈ 1.814.
Common mistakes and how to avoid them
Forgetting the factor in dx. dx = 2 dt/(1 + t²), not dt/(1 + t²).
Wrong sign of a − b. Write a + b and a − b before anything else; they decide the case.
Putting 0 and 2π into a tan(x/2) answer. Split at π.
Using this when an identity is faster. For 1/(1 ± cos x) or 1/(1 ± sin x), use the half-angle identities directly.
A practice routine
Day 1: Derive cos x and dx in terms of t without notes.
Day 2: Integrate 1/(2 + cos x), 1/(1 + 2 cos x) and 1/(3 − 2 cos x), and check each by differentiating at one value of x.
Day 3: Adapt the method for 1/(a + b sin x), starting with 1/(5 + 3 sin x).
Day 4: Two definite integrals over 0 to 2π, split correctly.
For the standard forms you are reducing to, our post on integrals with quadratic denominators has the completing-the-square method. If substitution itself still feels shaky, the Fermi Concept Library covers every concept in physics, chemistry, biology, mathematics and computing, each with its own lesson.
Tonight, integrate 1/(5 + 3 cos x) and check that the inverse tangent has the argument (1/2) tan(x/2).



