Integral $\int{\frac{x\cos(x)-\sin(x)}{2x^2+\sin^2(x)}dx}$ 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.

\begin{aligned}
\int \frac{x \cos x-\sin x}{2 x^{2}+\sin ^{2} x} d x &=\int \frac{\frac{x \cos x-\sin x}{x^{2}}}{2+\left(\frac{\sin x}{x}\right)^{2}} d x \\
&=\int \frac{d\left(\frac{\sin x}{x}\right)}{2+\left(\frac{\sin x}{x}\right)^{2}} \\
&=\frac{1}{\sqrt{2}} \tan ^{-1}\left(\frac{\sin x}{x \sqrt{2}}\right)+C
\end{aligned}
