<s>[INST] Indefinite Integral with "sin" and "cos": $\int\frac{3\sin(x) + 2\cos(x)}{2\sin(x) + 3\cos(x)} \; dx $ Indefinite Integral with sin/cos
I can't find a good way to integrate: $$\int\dfrac{3\sin(x) + 2\cos(x)}{2\sin(x) + 3\cos(x)} \; dx $$
 [/INST] Use this trigonometric identity:
$$
\frac{3\sin x+2\cos x}{2\sin x+3\cos x} = \overbrace{\frac{12}{13} + \frac5{13}\tan\left( x - \varphi \right)}^{\text{So integrate this function.}} \text{ where }\varphi = \arctan\frac 2 3.
$$
NOTE: I initially mislaid the denominator in $5/13$ and just had $5$ as the coefficient.  @robjohn pointed out the error in comments below.
Proof: The graph looks like a tangent function with period $\pi$ except that the inflection point is higher than the $x$-axis and the asymptotes are not at $\pm\pi/2$.  The asymptotes occur where the denominator is $0$, so at those points $2\sin x+3\cos x=0$, so $\tan x = -3/2$.  Hence the inflection points are at
$$
\frac\pi2 -\arctan\frac 3 2 = \arctan\frac 2 3.
$$
We have
$$
\frac{3\sin x+2\cos x}{2\sin x+3\cos x} = \frac{3\tan x + 2}{2\tan x + 3}
$$
and when $\tan x = \dfrac 2 3$ this simplifies to $\dfrac{12}{13}$.  So we want
$$
\frac {12}{13} + c\tan(x-\varphi) = \frac{12}{13} + c\frac{\tan x - \frac 2 3}{1+ \frac 2 3 \tan x} = \frac {12}{13} + c\frac{3\sin x - 2\cos x}{3\cos x + 2\sin x}.
$$
We need to find the value of $c$ for which we get the right function, and a bit of algebra tells us $c=5/13$.
</s>