# Evaluating Improper integral

Using the equation $\frac{1}{\sqrt{x}}=\frac{2}{\sqrt{\pi}}\int_{0}^{\infty}\exp(-\alpha^{2}x) \, \mathrm{d}\alpha$, for $\alpha>0$,

Compute the two integrals $$\int_{0}^{\infty} \frac{\cos x}{\sqrt{x}} \, \mathrm{d}x \quad \text{and} \quad \int_{0}^{\infty} \frac{\sin x}{\sqrt{x}} \, \mathrm{d}x.$$

Exactly as in the same spirit as M. Vinay, start with $$\frac{1}{\sqrt{x}}=\frac{2}{\sqrt{\pi}}\int_{0}^{\infty}\exp(-\alpha^{2}x) \, \mathrm{d}\alpha$$ replace $x$ by $-i$ and get $$\sqrt[4]{-1}=\frac{1+i}{\sqrt{2}}=\frac{2}{\sqrt{\pi}}\int_{0}^{\infty}\exp(i\alpha^{2}) \, \mathrm{d}\alpha$$ Now, change variable $\alpha^2=x$, so $\alpha=\sqrt x$, $d\alpha=\frac{dx}{2 \sqrt{x}}$ and so $$\frac{1+i}{\sqrt{2}}=\frac{1}{\sqrt{\pi}}\int_{0}^{\infty} \frac{e^{i x}}{\sqrt x} dx=\frac{1}{\sqrt{\pi}}\int_{0}^{\infty} \frac{\cos(x)+i~\sin(x)}{\sqrt x} dx$$ Now, identify the real and imaginary parts of both sides.
Let $C = \displaystyle\int_0^{\infty} \dfrac{\cos x}{\sqrt x} \, dx$ and $S = \displaystyle\int_0^{\infty} \dfrac{\sin x}{\sqrt x} \, dx$.
Then $C + iS = ?$ ($i = \sqrt{-1}$). Use Euler's formula for $\cos \theta + i \sin \theta$. Can you find the answer now?