Integral $\int{\frac{x\cos(x)-\sin(x)}{2x^2+\sin^2(x)}dx}$

calculusintegration

I need help with this integral:

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

I was given this integral in a Calculus worksheet, and I've tried every technique I know, specifically substitutions that just seem to make the integral harder. For reference, I am a first year Math student.

I just thought it wouldn't have a closed form but according to WolframAlpha the integral is
$$ I=- \frac{\arctan(\sqrt{2}x\csc(x))}{\sqrt{2}}+C$$

Edit: For instance, making the substitution $t = \tan(x)$, yielding
$$ \int{\frac{\sqrt{\frac{\arctan^2(t)}{1+t^2}}-\sqrt{\frac{t^2}{1+t^2}}}{2\arctan^2(t)(1+t^2)+t^2}}dt $$

I have achieved similar results with $t=\sin(x)$, $t=\cos(x)$, and that is where I'm stuck.

Best Answer

The integral

$$I = \int{\frac{x\cos x-\sin x}{2x^2+\sin^2x}}\,dx$$

can be solved by dividing through by $\sin^2 x$ so that

$$I = \int{\frac{x\cot x\csc x-\csc x}{1 + (\sqrt2x\csc x)^2}}\,dx\,.$$

Letting $u=\sqrt2x\csc x$ implies that

$$du = \sqrt2(\csc x - x\cot x\csc x)\ dx\,,$$

and so

$$\begin{aligned} I &= -\frac{1}{\sqrt{2}}\int{\frac{du}{1 + u^2}} \\ \\ &= -\frac{1}{\sqrt{2}}\arctan u + C \\ \\ &= -\frac{1}{\sqrt{2}}\arctan(\sqrt2x\csc x) + C\,. \end{aligned}$$