Definite integral with trigonometric functions I have problem finding, how to solve this integral
$$
\int _0 ^{\frac{\pi}{4}} \frac{3 \sin x + 2 \cos x}{2 \sin x + 3 \cos x}dx
$$
This I can rewrite as
$$
\int _0 ^{\frac{\pi}{4}} \frac{12 \sin ^2 x - 5 \cos x \sin x - 6}{4-13 \cos ^2 x}dx =
$$
$$
= \int _0 ^{\frac{\pi}{4}} \frac{12 \sin ^2 x}{4-13 \cos ^2 x}dx - \int _0 ^{\frac{\pi}{4}} \frac{5 \cos x \sin x}{4-13 \cos ^2 x}dx - \int _0 ^{\frac{\pi}{4}} \frac{6}{4-13 \cos ^2 x}dx
$$
But from this point, I can't get any closer to the answer.
Can you, please, help me?

Whenever you have to integrate a fraction involving odd powers of $\sin$ and $\cos$, the preferred algorithmic approach is the substitution $t = \tan \frac x 2$. This leads to $\mathrm{d}x = \frac 2 {1 + t^2} \mathrm{d}t$ and then, using that $\frac {\sin x} {\cos x} = \tan x = \tan (\frac x 2 + \frac x 2) = \frac {2t} {1-t^2}$ and $\sin^2 x + \cos^2 x = 1$ you get two equations with two unknowns ($\sin$ and $\cos$) that have for solutions $\cos x = \frac {1-t^2} {1+t^2}$ and $\sin x = \frac {2t} {1+t^2}$ (the signs were dictaded by the fact that on $[0,\frac {\pi} 4]$ $\sin$ and $\cos$ are positive). Next, use partial fraction expansion (i.e. split your integrand into as many simple fractions as possible, by studying the real roots of its denominator); if the degree of the numerator is larger than the one of the denominator, first divide the polynomials. The whole solution is too long to write here.
