TITLE: Divergent integral
QUESTION [5 upvotes]: Given
$$
\int^\infty_0 \frac{\sin^\alpha \left(\frac{1}{x+1}\right)\arctan(x)}
                   {(x^2+1)^\beta \tan\left(\frac{1}{x^2+1}\right)}dx 
$$
find for which values of $\alpha$ and $\beta$ the integral is divergent.

My approach to such integrals is to solve them by finding the correct asymptotic relations between the separate parts of it. In this particular integral, $\infty$ is surely a "problem point" so we get asymptotically equal functions as $x \to \infty$ such as: $\sin^\alpha\left(\frac{1}{x+1}\right) \sim \frac{1}{x+1} \sim \frac{1}{x}$ and so on with the rest.
My problem here is that I'm not sure if $0$ is a "problem point" (such point that the function in it has "undefined behavior") and are there any other "problem points" in the $[0, \infty]$ interval?

REPLY [3 votes]: hint
Near $ +\infty $,
$$f(x)\sim \frac{\pi}{2}\frac{x^{-\alpha}}{x^{2\beta}x^{-2}}$$
$$\int^{\infty}f(x)dx \text{ converges }
\iff $$
$$2\beta +\alpha-2>1$$
Near $0^+ $, no problem since
$$(\forall x\in[0,+\infty))\;0<\frac{1}{x^2+1}\le 1 <\frac{\pi}{2}$$
and
$$\lim_{x\to0^+}f(x)=0$$
So, the integrale is divergent
$$\iff 2\beta+\alpha\le 3$$