<s>[INST] $\int_{1}^\infty(1-\frac{1}{x})^{x^2}dx$ converges or diverges Determine if the integral $\int_{1}^\infty(1-\frac{1}{x})^{x^2}dx$ converges / diverges:
My attempt:
Notice that $\lim_{x \to \infty}(1+\frac{-1}{x})^x=e^{-1}$, so for every $\varepsilon>0$ there exists $M>0$ such that for every $x>M$ we have $|(1+\frac{-1}{x})^x-\frac{1}{e}|<\frac{1}{2}-\frac{1}{e}$ so we have $(1+\frac{-1}{x})^x<\frac{1}{2}$.
So for every $x \ge M$ we have $(1+\frac{-1}{x})^{x^2} \le \frac{1}{2^x}$,
So $\int_{1}^\infty(1-\frac{1}{x})^{x^2}dx \le  \int_{1}^\infty\frac{1}{2^x}dx < \infty$, so it converges.
Is my proof correct?
Thanks a lot!
 [/INST] A continuation of @Gary's observation:
As you have showed, we know that for every $x \ge M$ (for some $M\geq 1$) we have $(1+\frac{-1}{x})^{x^2} \le \frac{1}{2^x}$. Therefore
$$\int_{1}^\infty(1-\frac{1}{x})^{x^2}dx =\int_{1}^M(1-\frac{1}{x})^{x^2}dx+\int_{M}^\infty(1-\frac{1}{x})^{x^2}dx\le \int_{1}^M(1-\frac{1}{x})^{x^2}dx+ \int_{M}^\infty\frac{1}{2^x}dx $$
Since
$$\int_{M}^\infty\frac{1}{2^x}dx < \infty$$
holds, it suffices to show
$$\int_{1}^M(1-\frac{1}{x})^{x^2}dx<\infty.$$
Because $[1,M]$ is closed and bounded, it suffices to show that there exists a $C\geq 0$ with
$$(1-\frac{1}{x})^{x^2}\le C,\quad x\in[1,M].$$
</s>