<s>[INST] Added angle formula to solve this indefinite integral $\int\frac{2\cos x-\sin x}{3\sin x+5\cos x }\,dx$ Starting from this very nice question Integrate $\int\frac{2\cos x-\sin x}{3\sin x+5\cos x }\,dx$ and the relative answers, I would to understand because this integral $$\int\frac{2\cos x-\sin x}{3\sin x+5\cos x }\,dx \tag 1$$
must be split thus:
$$\int \frac{2\cos{x}-\sin{x}}{3\sin{x}+5\cos{x}} \; dx=\color{red}{\int A\left(\frac{3\sin{x}+5\cos{x}}{3\sin{x}+5\cos{x}}\right) +B \left(\frac{ 3\cos{x}-5\sin{x}}{3\sin{x}+5\cos{x}}\right)\; dx}$$
or it can be splitted in a different way.
Using the added angle formula (for numerator and denominator of the $(1)$) $$a\sin x+b\cos x=\lambda \sin (x+\phi)$$ if $\lambda=\sqrt{a^2+b^2}$ and $\tan \phi=b/a \ $ or $$a\sin x+b\cos x=\lambda \cos (x+\varphi)$$ with $\tan \varphi=-a/b \ $ is it possible to obtain the same result?
 [/INST] Answer for @Koro: Yes with some calculus I obtain:
$$\int \left(\cos \left(a+b\right)-\tan \left(t\right)\sin \left(a+b\right)\right)dt=t\cos \left(a+b\right)+\sin \left(a+b\right)\ln \left|\cos \left(t\right)\right|+k, \quad k\in\mathbb R$$
Hence,
$$\int\frac{2\cos x-\sin x}{3\sin x+5\cos x }dx=$$
$$=\sqrt{\frac{5}{34}}\left[(x-b)\cos \left(a+b\right)+\sin \left(a+b\right)\ln \left|\cos \left(x-b\right)\right|\right]+k=$$
But $a=\arctan (1/2)$ and $b=\arctan (3/5)$. But I will have many calculus having,
$$\cos(\arctan (1/2)+\arctan (3/5))=\dotsb$$
$$\sin(\arctan (1/2)+\arctan (3/5))=\dotsb$$
$$(x-\arctan (3/5))=\dotsb, \quad \cos(x-\arctan (3/5))=\dotsb$$
I think that it takes a lot of time for this way.....to obtain the solution.
</s>