Find $ \int \frac{1}{2\sin(x)-3\cos(x)}dx$. 
Find $\displaystyle \int \dfrac{1}{2\sin(x)-3\cos(x)}dx$.

My book said to solve this by saying $u = \tan \left(\dfrac{x}{2} \right)$ since $\cos(x) = \dfrac{1-u^2}{1+u^2}$ and $\sin(x) = \dfrac{2u}{1+u^2}$. I don't see how this will help since $du = \dfrac{1}{\cos(x)+1}dx $. How will we get that in the integrand?

The substitution works because you get
$$
x=2\arctan u
$$
so
$$
dx=\frac{2}{1+u^2}\,du
$$
Since
$$
2\sin x-3\cos x=2\frac{2u}{1+u^2}-3\frac{1-u^2}{1+u^2}=
\frac{3u^2- 4u -3}{1+u^2}
$$
the integral becomes
$$
\int\frac{1+u^2}{3u^2- 4u -3}\frac{2}{1+u^2}\,du=
2\int\frac{1}{3u^2-4u  -3}\,du
$$
that's solvable by partial fractions.
A different way is to write
$$
2\sin x-3\cos x=A\sin(x-\varphi)
$$
that becomes
$$
2\sin x-3\cos x=A\sin x\cos\varphi-A\cos x\sin\varphi
$$
so we can set
$$
A\cos\varphi=2,\quad A\sin\varphi=3
$$
and so $A^2=13$. There is a unique angle $\varphi\in[0,2\pi)$ such that
$$
\sin\varphi=\frac{3}{\sqrt{13}},\quad
\cos\varphi=\frac{2}{\sqrt{13}}
$$
Now the integral becomes
$$
\sqrt{13}\int\frac{1}{\sin(x-\varphi)}\,dx
$$
and we can do the substitution $x-\varphi=2u$, so $dx=2\,du$ and the integral is
\begin{align}
\sqrt{13}\int\frac{1}{\sin u\cos u}\,du
&=\sqrt{13}\int\frac{\sin^2u+\cos^2u}{\sin u\cos u}\,du\\
&=\sqrt{13}\left(\int\frac{\sin u}{\cos u}\,du
+\int\frac{\cos u}{\sin u}\,du\right)\\
&=\sqrt{13}(\log|\cos u|-\log|\sin u|)+c
\end{align}
and it's just tedious to do the back substitution.
