# Need help solving this indefinite trigonometric integral $\int \frac{\mathrm dx}{(a+b\cos x)^2}$ for $a>b$

Source: Question bank on challenging integral problems for high school students. An advanced level problem

Problem: Evaluate the indefinite integral: $$\int \frac{\mathrm dx}{(a+b\cos x)^2}$$ given that $a>b$

My try on it: It seems simple enough but upon a deeper look I can't find a suitable substitution for it. Not even going to try integrating by parts! Tried constructing a function whose integral is the one above. Gotten close results but not quite it. And that is not the correct approach anyway! Also tried using Partial fractions by constructing a function

$${1\over(a+by)^2} = {Ay+B\over(a+by)^2} + {Cy+D\over a+by}$$

• use the tan halfe angle substitution – Dr. Sonnhard Graubner Aug 21 '17 at 16:57
• Suppose you knew how to solve$$\int\frac{\mathrm dx}{a+b\cos(x)}$$Just differentiate this w.r.t. $a$ and you are done. – Simply Beautiful Art Aug 21 '17 at 17:07
• @Dr.SonnhardGraubner tan half angle sub? – YourAverageEuler Aug 21 '17 at 17:14
• yes that is what i meant – Dr. Sonnhard Graubner Aug 21 '17 at 17:15
• @SimplyBeautifulArt : "solve" is the wrong word for that. "evaluate" would fit. $\qquad$ – Michael Hardy Aug 22 '17 at 3:39

$$\int \frac{\mathrm dx}{(a+b\cos x)^2}$$
At this hour I am not clever so I'll just pound on this until it yields, as follows. Michael Spivak's calculus textbook says the "world's sneakiest substitution" is the tangent half-angle substitution, and that it is used with rational functions of sine and cosine (it can also be used to solve some differential equations): \begin{align} \tan\frac x 2 & = u \\[10pt] x & = 2\arctan u \\[10pt] dx & = \frac{2\,du}{1+u^2} \\[10pt] \cos x & = \text{[ here apply the double-angle formula for the cosine} \\ & \qquad \text{and then that stuff about drawing right triangles ]} \\[10pt] & = \frac{1-u^2}{1+u^2}. \end{align} This is due to Euler and often erroneously attributed to Weierstrass. \begin{align} & \int \frac{dx}{(a+b\cos x)^2} = \int \frac{\left( \frac{2\,du}{1+u^2} \right)}{\left( a + b\frac{1-u^2}{1+u^2} \right)^2} = \int \frac{2(1+u^2)\, du}{(a(1+u^2)+b(1-u^2))^2} \\[10pt] = {} & 2 \int \frac{(1+u^2)\,du}{((a-b)u^2 + (a+b))^2} = \cdots \end{align} Now notice that if $a+b>0$ and $a-b<0,$ then the denominator can be factored without using imaginary numbers, but if $a+b$ and $a-b$ are both positive you need other methods. Or more generally if $a+b$ and $a-b$ have opposite signs then you can factor the denominator (and then use partial fractions) and if they have the same sign, then you work with an irreducible quadratic factor in the denominator.
• Nice try but here it should've been $\int{ 2(1+u^2)du\over{{(a(1+u^2)+b(1-u^2))}}^2}$ – YourAverageEuler Aug 22 '17 at 7:43