# $\int\frac{a\cos x+b}{(a+b\cos x)^2}dx=\;?$

Answer Given: $\frac{\sin x}{a\cos x+b}$.

My Answer: $\frac{\sin x}{a+b\cos x}$.

Method I Used:

I used this: $$\int\frac{f(x)}{[p(x)]^2}=\int\frac{f(x)}{p'(x)}.\frac{p'(x)}{[p(x)]^2}.$$ and applied integration by parts.

Working:

Complete working is too long, so I'll be writing main things.

$\int\frac{a\cos x+b}{b\sin x}.\frac{b\sin x}{(a+b\cos x)^2}dx.$

I applied integration by parts and took $\frac{a\cos x+b}{b\sin x}$ as first function.

The differentiation of first function I got was $\frac{-a-b\cos x}{b\sin^2x}$.

The integration of second function I got was $\frac{-1}{a+b\cos x}$.

I used these values and simplified and got a little different answer, mentioned above.

Also, I tried using different methods, like writing $\cos x$ in terms of $\tan(x/2)$ or breaking numerator into P(Denominator) + Q, where $P$ and $Q$ are constants, but they gave different answers.

Kindly Help.

Let $\displaystyle \mathcal{I} = \int\frac{a\cos x+b}{(a+b\cos x)^2}dx = \int \frac{(a+b\cos x)\cdot (\sin x)'-\sin x\cdot (a+b\cos x)'}{(a+b\cos x)^2}dx$

So $\displaystyle \mathcal{I} = \int \bigg(\frac{\sin x}{a+b\cos x}\bigg)'dx = \frac{\sin x}{a+b\cos x}+\mathcal{C}$

Alternate

Let $\displaystyle I = \int\frac{a\cos x+b}{(a+b\cos x)^2}dx = \int\frac{a\csc x\cot x+b\csc^2 x}{(a\csc x+b\cot x)^2}dx$

substitute $a\csc x+b\cot x = t$ and $(a\csc x\cot x+\csc^2 x)dx = -dt$

so $\displaystyle \mathcal{I} = -\int t^{-2}dt = \frac{1}{t}+\mathcal{C} = \frac{\sin x}{a+b\cos x}+\mathcal{C}$

Alternate

$\displaystyle I = \int\frac{a\cos x+b(\cos^2 x+\sin^2 x)}{(a+b\cos x)^2}dx = \int\frac{\cos x}{(a+b\cos x)}dx+\int\frac{b\sin^2 x}{(a+b\cos x)^2}dx$

by parts for $(1)$

$\displaystyle I = \frac{\sin x}{a+b\cos x}-\int\frac{b\sin^2 x}{(a+b\cos^2 x)dx}+\int\frac{b\sin^2 x}{(a+b\cos^2 x)dx}=\frac{\sin x}{a+b\cos x}+\mathcal{C}$

• So the answer given is incorrect. Thanks, nice answer. – Cheapstrike Jan 14 '17 at 9:59

Your result seems to be the correct one, you can verify this quickly by differentiating. The same way you can also find the integral for which the answer was perhaps intended: $$\int \frac{a+b\cos x}{(a \cos x+b)^2} dx = \frac{\sin x}{a\cos x+b}+C$$ Check your textbook if you didn't miss something....

Edit: You actually don't need to differentiate to figure out that those two results differ only by exchanging $a$ and $b$. But I would still recommend differentiating to check the results if something like this happens in general.

• Thanks. I'll keep that in mind. – Cheapstrike Jan 14 '17 at 10:07