<s>[INST] Find every $a>0$ such that $\int_2^{\infty} \frac{x^6(1+\cos^2 x)}{(x-1)^2(x+1)^2x^a} dx$ converges We know that $\forall x \in [2,+\infty)$,
$$\frac{x^6(1+\cos^2 x)}{(x-1)^2(x+1)^2x^a} \leq  \frac{2x^6}{(x-1)^2(x+1)^2x^a}$$
And it's easy to prove that $\int_2^{\infty} \frac{2x^6}{(x-1)^2(x+1)^2x^a} dx$ converges if and only if $a>3$. 
But is it legitimate to conclude that our first integral converges if and only if $a>3$? The Comparison Criterion says that if $0 \leq f\leq g$, then, if $g$ converges, $f$ converges. But the converse isn't valid. Are we losing any possible values for $a$?
For example, the following equivalence holds:
$$\int_2^{\infty} \frac{x^6(1+\cos^2 x)}{(x-1)^2(x+1)^2x^a} dx = \int_2^{\infty} \frac{2x^6}{(x-1)^2(x+1)^2x^a} dx - \int_2^{\infty} \frac{x^6(\sin^2 x)}{(x-1)^2(x+1)^2x^a} dx$$
Shouldn't we prove that $\int_2^{\infty} \frac{x^6(\sin^2 x)}{(x-1)^2(x+1)^2x^a} dx$ converges to $0$?
I'm confused.
 [/INST] Let $f(x)$ be the given integrand and $g(x)=x^{2-a}(1+\cos^{2}x)$. You can easily verify that $\frac {f(x)} {g(x)} \to 1$ as $ x \to \infty$. Hence $\int_2^{\infty} f(x)dx$ is finite iff $\int_2^{\infty} g(x)dx$ is finite. Now using the fact that $x^{2-a} \leq g(x) \leq 2x^{2-a}$ we can conclude that $\int_2^{\infty} g(x)dx$ is finite iff $\int_2^{\infty} x^{2-a}dx$ is finite. Clearly, this is true iff $a >3$. 
</s>