Find $\int \frac {(1+x^2)(2+x^2)}{(x \cos x+\sin x)^4}dx$

indefinite-integralsintegrationtrigonometric-integrals

I came across this integral while studying indefinite integrals.

So far I have had many unsuccessful attempts which include – trying by parts – but I could not find a way to proceed with it.

I even tried dividing both numerator and denominator by $x^4$ to yield $$\int \frac {(1+x^{-2})(1+2x^{-2})}{( \cos x+ \frac \sin x)^4}dx.$$ But I am still not able to move forward.

I even tried to cheat a little bit by taking derivative of options, still nothing.

And many more..

So the problem still stands. Can someone tell me how to proceed?

(Note: this is a problem from very elementary calculus course so no contour integrals, no multivariable and such stuff, however I think differentiation under integration would be fine. Also it would help if answers are one of those present in options (see image).)

Edit: Thanks to comments now I know answer is C but I was wondering if anyone could show me a straightforward way to do it thanks!
Edit 2 : turns out B is also correct.

Best Answer

Let $f_n(x) = \left( \frac {\cos x - x \sin x}{x\cos x + \sin x} \right)^n$ and evaluate

$$\frac{df_n(x)}{dx} = -\frac{n(\cos x - x \sin x)^{n-1}(x^2+2)}{(x\cos x + \sin x)^{n+1}}$$

For $n=1$ and $3$, respectively \begin{align} &\frac{df_1(x)}{dx} = -\frac{x^2+2}{(x\cos x + \sin x)^{2}}\\ &\frac{df_3(x)}{dx}=- \frac{3(\cos x - x \sin x)^2(x^2+2)}{(x\cos x + \sin x)^{4}} \end{align}

which leads to

$$\frac {(1+x^2)(2+x^2)}{(x \cos x+\sin x)^4} = -\frac{d}{dx}\left(\frac13f_3(x)+f_1(x)\right)$$

and

$$\begin{align} & \int \frac {(1+x^2)(2+x^2)}{(x \cos x+\sin x)^4}dx \\ =& -\frac13f_3(x)-f_1(x) \\ =& -\frac13 \left( \frac {\cos x - x \sin x}{x\cos x + \sin x} \right)^3 - \frac {\cos x - x \sin x}{x\cos x + \sin x} \\ =& -\frac13 \left( \frac {1- x \tan x}{x + \tan x} \right)^3 - \frac {1- x \tan x}{x + \tan x} \\ \end{align}$$