<s>[INST] Integral $\int\frac{2x^2}{2x\cos(2x)+(x^2-1)\sin(2x)} \mathrm d x$ 
Integrate  $\displaystyle\int\dfrac{2x^2}{2x\cos(2x)+(x^2-1)\sin(2x)} \mathrm d x$

I tried dividing by $\cos^2(x)$ and then substituting $\tan(x)=t$.
 [/INST] $$2x\cos (2x)+(x^2-1)\sin 2x=(x^2+1)\bigg[\frac{2x}{x^2+1}\cos 2x+\frac{x^2-1}{x^2+1}\sin 2x\bigg]$$
$$=(x^2+1)\cos\bigg(2x-2\alpha\bigg)$$
$\displaystyle \sin(2\alpha)=\frac{x^2-1}{x^2+1}$ and $\displaystyle \cos(2\alpha)=\frac{2x}{x^2+1}$
integration $$=\int\sec\bigg(2x-\tan^{-1}\frac{x^2-1}{2x}\bigg)\frac{2x^2}{x^2+1}dx$$
put $\displaystyle 2x-\tan^{-1}\bigg(\frac{x^2-1}{2x}\bigg)=t$
And $\displaystyle \frac{2x^2}{x^2+1}dx=dt$
Integral $$=\int \sec(t)dt=\ln\bigg|\sec (t)+\tan (t)\bigg|+C$$
</s>