in an old book on calculus in the chapter about improper integrals there was this theorem that says when $\int_{a}^{\infty }f(x)dx $ can be written in the form
$\int_{a}^{\infty} \frac{\phi (x)}{x^k}dx$ you can test for convergence by verifying that $|\phi (x)|<M $
and $k>1$ what i don't understand is how do we write $f(x)$ in that form what is the choice of $\phi(x)$and$x^k$ depend on for example
$ \int_{0}^{\infty}e^{-x^2}dx$ can be written as $\frac{x^2 e^{-x^2}}{x^2}$ and therefor converges but why did we choose$x^2$not $x$ for example ?
Because one of the assumptions is that $k>1$. Besides, although you can indeed write $e^{-x^2}$ as $\frac{xe^{-x^2}}x$, since $\int_a^\infty\frac{\mathrm dx}x$ diverges, you deduce nothing from that.