Solving $\int_0^{+\infty}\frac{e^{-\alpha x^2} - \cos{\beta x}}{x^2}dx$ I need to find solution of $$\int_0^{+\infty}\frac{e^{-\alpha x^2} - \cos{\beta x}}{x^2}dx$$
I know that Leibniz rule can help but I don't know how to use it.
Could you help me please?
Thank you.
 A: We divide the integral as in my comment. With
$$
I(\alpha)=\int_0^{+\infty}\frac{e^{-\alpha x^2}-1}{x^2}\,dx,\quad\alpha>0
$$
we finde that
$$
I'(\alpha)=-\int_0^{+\infty}e^{-\alpha x^2}\,dx=\frac{1}{2}\sqrt{\frac{\pi}{a}}.
$$
Since $\lim_{\alpha\to0^+}I(\alpha)=0$, we find that
$$
I(\alpha)=\int_0^\alpha I'(a)\,da=-\sqrt{\pi \alpha}.
$$
Similarly, with the second integral,
$$
J(\beta)=\int_0^{+\infty}\frac{\cos\beta x-1}{x^2}\,dx,\quad\beta\in\mathbb{R},
$$
we find that
$$
J'(\beta)=-\int_0^{+\infty}\frac{\sin \beta x}{x}\,dx=-\frac{\pi}{2}\text{sign}\,\beta
$$
Thus, since $\lim_{\beta\to 0}J(\beta)=0$, we get
$$
J(\beta)=\int_0^\beta J'(b)\,db=-\frac{\pi}{2}|\beta|
$$
Thus, the integral asked for converges, with value
$$
\frac{\pi}{2}|\beta|-\sqrt{\pi \alpha},
$$
valid for $\alpha>0$ and real $\beta$.
A: Comparison with $1/x$ shows that the integral does not converge at $x=0$.
A: You can separate the fraction, but it seems as Julian Aguirre pointed out, the first part does not converge at x=0:
$$
\int_0^{\infty}\dfrac{\exp(-α\,x)}{x^2}-\dfrac{\cosβ\,x}{x^2}\,dx
$$
This can be easily understood in the case of $α=0$.
But the indefinite integral can be found, it involves the incomplete gamma function.
Edit:
As you edited your question it is now solvable and indeed $\frac{\pi\,\beta}{2}-\sqrt{\alpha\pi}$ for $\beta>0$ and $\alpha>0$.
A: Assume that $\alpha>0$ and $\beta>0$. You may write
$$
\int_0^{+\infty}\frac{e^{-\alpha x^2} - \cos{\beta x}}{x^2}dx=\int_0^{+\infty}\frac{e^{-\alpha x^2} - 1}{x^2}dx+\int_0^{+\infty}\frac{1 - \cos{\beta x}}{x^2}dx
$$ then use two standard results. By an integration by parts, we have
$$
\begin{align}
\int_0^{+\infty}\frac{e^{-\alpha x^2} - 1}{x^2}dx &=\left. -\frac{e^{-\alpha x^2} - 1}{x}\right|_0^{+\infty}-2\alpha\int_0^{+\infty}e^{-\alpha x^2}dx=-\sqrt{\pi\alpha}.
\end{align}
$$ On the other hand, using a standard result, we have
$$
\begin{align}
\int_0^{+\infty}\frac{1 - \cos{\beta x}}{x^2}dx &=2\int_0^{+\infty}\frac{\sin^2{(\beta x/2)}}{x^2}dx=\frac{\pi}2\beta.
\end{align}
$$ Then

$$
\int_0^{+\infty}\frac{e^{-\alpha x^2} - \cos{\beta x}}{x^2}dx=\frac{\pi}2\beta-\sqrt{\pi\alpha}.
$$

