# Evaluating $\int \frac {3\cos x}{(2\sin x-5\cos x)}\,dx$

$$\int \dfrac {3\cos x}{(2\sin x-5\cos x)}\,dx$$

I've been thinking and trying to work this out in quite a few ways:

1)Taking conjugate which actually complicates it further

2)Using half angle formula to convert the expression in terms of tan but I get 2 terms in the integration of which I'm unable to integrate 1 term because I can't seem to be able to make a suitable substitution.

3)Dividing throughout by $$\cos^2 x$$

Hint. A standard trick is to consider $$I=\int\frac{sin x}{\sin x-5\cos x}dx,\quad J=\int\frac{cos x}{\sin x-5\cos x}dx$$ then one may observe that $$I-5J=\int dx=\color{red}?,\qquad 5I+J=\int\frac{(\sin x-5\cos x)'}{\sin x-5\cos x}dx=\color{red}?$$Hope you can take it from here.

Use:

$$3 \cos x = \lambda (2\sin x - 5\cos x) + \mu(2\cos x + 5 \sin x)$$

Putting $$x = 0$$ and $$x = \pi/2$$ and solving the two equations we get:

$$\lambda = -\dfrac {15}{29}$$ and $$\mu = \dfrac 6{29}$$

So we have:

$$\int \frac {3\cos x}{(2\sin x-5\cos x)}\,dx \\ = \int \dfrac{\lambda(2\sin x - 5 \cos x)+ \mu(2\cos x + 5 \sin x)}{2\sin x - 5 \cos x} \\ = \int \lambda dx + \mu\int \dfrac{2\cos x+ 5\sin x}{2 \sin x - 5 \cos x}dx \\ =\lambda x + \mu \ln (2\sin x - 5\cos x) + c = -\dfrac{15}{29} x + \dfrac{6}{29} \ln (2\sin x - 5\cos x) + c$$

Hint:

By shifting the argument, you can turn the denominator to $$\sqrt{29}\cos x$$. Then the numerator becomes of the form $$a\cos x+b\sin x$$, and the fraction is easy to integrate.