The problem I'm facing is as it follow:
For which values of $a$ the integral converges:
$$\int_{0}^{1} \frac{\sqrt {e^2+x^2} - e^{\cos x}}{\tan^ax}dx$$
So far I figured that if $a< 1$, the integral converges. I have been struggling with what to do for $a \geq 1$, with all the previous problems for improper integrals that I faced being solvable by comparison with another integrals or the p-tests.
Hint. The integrand is a continuous function over $(0,1]$. Then the only potential problem is near $0$. As $x \to 0^+$, by standard Taylor expansions, one has $$ \frac{\sqrt {e^2+x^2} - e^{\cos x}}{\tan^ax} =\frac{e(1+x^2e^{-2}/2+o(x^2)) - e(1-x^2/2+o(x^2))}{x^a+O(x^{a+2})}=\frac{\cosh 2}{x^{a-2}} +O\left(\frac1{x^{a-4}} \right) $$ which converges iff $a-2<1$.