# Integrate $\int\frac{\left(1+x\right)\sin x}{\left(x^{2}+2x\right)\cos^{2}x-\left(1+x\right)\sin2x}dx$

(Q) $\displaystyle \int\frac{\left(1+x\right)\sin x}{\left(x^{2}+2x\right)\cos^{2}x-\left(1+x\right)\sin2x}dx$

Tried a lot to expand denominator and reduce it to bring its derivative on top , but all in vain .

Let $$\displaystyle I = \int\frac{(1+x)\sin x}{(x^2+2x)\cos^2 x-(1+x)\sin 2x}dx$$

$$\displaystyle I = \int\frac{(1+x)\sin x}{(x^2+2x+1)\cos^2 x-(1+x)\sin 2x-\cos^2 x}dx$$

$$\displaystyle I = \int\frac{(1+x)\sin x}{\left[(x+1)\cos x\right]^2-2(x+2)\sin x\cdot \cos x-(1-\sin^2 x)}dx$$

So $$\displaystyle I = \int\frac{(1+x)\sin x}{\left[(x+1)\cos x\right]^2-2(x+1)\sin x\cdot \cos x+\sin^2 x-1}dx$$

$$\displaystyle I = \int\frac{(1+x)\sin x}{\left[(x+1)\cos x-\sin x\right]^2-1^2}dx$$

Now Let $(x+1)\cos x-\sin x = t\;,$ Then $(x+1)\sin xdx = -dt$

So Integral $$\displaystyle I = -\int\frac{1}{t^2-1}dt = -\frac{1}{2}\int\left[\frac{1}{t-1}-\frac{1}{t+1}\right]dt$$

So we get $$\displaystyle I = \frac{1}{2}\left[\ln|t+1|-\ln|t-1|\right]+\mathcal{C} = \frac{1}{2}\ln\left|\frac{t+1}{t-1}\right|+\mathcal{C}$$

So we get $$\displaystyle I = \frac{1}{2}\ln \left|\frac{(x+1)\cos x-\sin x+1}{(x+1)\cos x-\sin x-1}\right|+\mathcal{C}$$

• Haha lol i had done the same way but the third didn't click in my mind . Anyway thanks soo much for writing all the steps , #respect – Sujith Sizon Sep 13 '15 at 8:05
• When I saw the substitution, then I realized and for sure that the poster is @juantheron..! (y) – Aditya Agarwal Sep 13 '15 at 8:17