# I can't find a good way to integrate: \int\frac{3\sin(x)+2\cos(x)}{2\sin(x)+3\cos(x)}dx

I can't find a good way to integrate:
$$\displaystyle\int{\frac{{{3}{\sin{{\left({x}\right)}}}+{2}{\cos{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}$$

• Questions are typically answered in as fast as 30 minutes

### Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Jillian Edgerton
We can split this into two integrals:
$$\displaystyle{3}\int{\frac{{{\sin{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}+{2}\int{\frac{{{\cos{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}$$
Focusing on the second integral we find:
$$\displaystyle\int{\frac{{{\cos{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}=\int{\frac{{{1}}}{{{2}{\tan{{\left({x}\right)}}}+{3}}}}{\left.{d}{x}\right.}$$
Make the substitution $$\displaystyle{u}={2}{\tan{{\left({x}\right)}}}+{3}$$ which makes
$$\displaystyle{d}{u}={2}{{\sec}^{{2}}{\left({x}\right)}}{\left.{d}{x}\right.}={2}{\left({{\tan}^{{2}}{\left({x}\right)}}+{1}\right)}{\left.{d}{x}\right.}={2}{\left({u}^{{2}}+{1}\right)}{\left.{d}{x}\right.}$$
Thus we have
$$\displaystyle\int{\frac{{{\cos{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}={\frac{{12}}{\int}}{\frac{{{1}}}{{{u}{\left({u}^{{2}}+{1}\right)}}}}{d}{u}={\frac{{{1}}}{{{2}}}}\int{\left({\frac{{{1}}}{{{u}}}}-{\frac{{{u}}}{{{u}^{{2}}+{1}}}}\right)}{d}{u}$$
This integral can be computed by another substitution:
$$\displaystyle\int{\frac{{{\cos{{\left({x}\right)}}}}}{{{2}{\sin{{\left({x}\right)}}}+{3}{\cos{{\left({x}\right)}}}}}}{\left.{d}{x}\right.}={\frac{{12}}{{{\ln}{\left|{2}{\tan{{\left({x}\right)}}}+{3}\right|}-{\frac{{{1}}}{{{2}}}}{\ln}{\left|{\left({2}{\tan{{\left({x}\right)}}}+{3}\right)}^{{2}}+{1}\right|}}}}+{C}$$
That completes the second integral. The first can be handled in a similar manner.
###### Not exactly what you’re looking for?
veiga34
It is a pity you did not have a minus-sign in the numerator, since
$$\displaystyle{D}{\ln{{\left({3}{\cos{{x}}}+{2}{\sin{{x}}}\right)}}}={\frac{{{2}{\cos{{x}}}-{3}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}$$
but let us see how we can use this fact anyways.
Let us aim at writing
$$\displaystyle{\frac{{{2}{\cos{{x}}}+{3}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}={c}_{{1}}{\frac{{{2}{\cos{{x}}}-{3}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}+{c}_{{2}}{\frac{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}$$
since both those terms are easy to integrate. This leads us to the linear equations $$\displaystyle{2}={2}{c}_{{1}}+{3}{c}_{{2}}$$ and $$\displaystyle{3}=-{3}{c}_{{1}}+{2}{c}_{{2}}$$. The solution to this system is $$\displaystyle{c}_{{1}}=-\frac{{5}}{{13}}$$ and $$\displaystyle{c}_{{2}}=\frac{{12}}{{13}}$$. Thus
$$\displaystyle\int{\frac{{{2}{\cos{{x}}}+{3}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}{\left.{d}{x}\right.}=-{\frac{{{5}}}{{{13}}}}\int{\frac{{{2}{\cos{{x}}}-{3}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}{\left.{d}{x}\right.}+{\frac{{{12}}}{{{13}}}}\int{\frac{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}{{{3}{\cos{{x}}}+{2}{\sin{{x}}}}}}{\left.{d}{x}\right.}$$.
I guess you can take it from here?
karton

Let there be a right triangle with angle A(not with measurement 90 deg) whose adjacent has measurement 3 and whose opposite has measerement 2. Therefore the hypotenuse of the triangle has measurement $$\sqrt{13}$$
So this means

$$\sin(A)=\frac{2}{\sqrt{13}}\ \text{and}\ \cos(A)=\frac{3}{\sqrt{13}}. \\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}\cos(x-A) \\\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)} \\=\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)\int1dx \\=((\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) \\=(\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|\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$$