<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] ![The method I was speaking of if anyone especially OP is interested.... ][1]
[1]: http://i.stack.imgur.com/r05sp.jpg  $$
\text{ Let there be a right triangle with angle A (not with measurement 90 deg) } \\ 
\text{  whose adjacent has measurement }  3 \text{ and whose opposite has measurement } 2. \\ 
\text{ Therefore the  hypotenuse of the triangle has measurement } \sqrt{13}. \\
\text{ So this means } \sin(A)=\frac{2}{\sqrt{13}} \text{ and } \cos(A)=\frac{3}{\sqrt{13}} . \\  \text{  } \\ \text{  } \\ 
3 \sin(x)+2 \cos(x)=\sqrt{13}(\frac{3}{\sqrt{13}} \sin(x)+\frac{2}{\sqrt{13}} \cos(x)) \\  
=\sqrt{13}(\cos(A) \sin(x)+\sin(A) \cos(x)) =\sqrt{13} \sin(x+A) \\ \text{   } \\ \text{   } 
  2 \sin(x)+3 \cos(x)  = \sqrt{13}(\frac{2}{\sqrt{13}} \sin(x)+\frac{3}{\sqrt{13}} \cos(x))  \\  \text{   } \\ \text{   }
=\sqrt{13}(\sin(A) \sin(x)+\cos(A) \cos(x)) =\sqrt{13} \cos(x-A) \\  
\text{… } \\
\int \frac{ 3 \sin(x)+2 \cos(x)}{  2 \sin(x)+3 \cos(x)   } dx= \int \frac{\sqrt{13} \sin(x+A)   }{\sqrt{13} \cos(x-A)   } dx \\
=\int \frac{ \sin(x-A+2A)} {\cos(x-A)} dx=\int \frac{ \sin(x-A) \cos(2A)+ \sin(2A) \cos(x-A)}{\cos(x-A)} dx \\ =\cos(2A) \int \frac{ \sin(x-A)}{\cos(x-A)} dx+ \sin(2A) \int \frac{\cos(x-A)}{\cos(x-A)} dx\\ 
=(\cos^2(A)-\sin^2(A)) \int \frac{\sin(x-A)}{\cos(x-A)} dx+2 \sin(A) \cos(A) \int 1 dx \\ 
=((\frac{3}{\sqrt{13}})^2-(\frac{2}{\sqrt{13}})^2) \int \frac{-du}{u} +2 \frac{2}{\sqrt{13}}  \frac{3}{\sqrt{13}} x +C \\ 
\text{ (note: where } u=\cos(x-A) \text{ and so } du=-\sin(x-A) dx \text{ ) } \\
=(\frac{9}{13}-\frac{4}{13}) (- \ln|u|)+\frac{12}{13} x+C \\ 
=- \frac{5}{13} \ln|\cos(x-A)| +\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|\cos(x) \cos(A)+\sin(x) \sin(A)|+\frac{12}{13}x+C \\
=-\frac{5}{13} \ln|\cos(x) \frac{3}{\sqrt{13}}+ \sin(x) \frac{2}{\sqrt{13}}|+\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln| \frac{1}{\sqrt{13}} (3 \cos(x)+2  \sin(x))| +\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+C \\ 
=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x-\frac{5}{13} \ln|\frac{1}{\sqrt{13}}|+C \\ 
=-\frac{5}{13} \ln|3 \cos(x)+2 \sin(x)|+\frac{12}{13}x+K \\ 
$$
</s>