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.