Here is a (non-rigorous) proof with Fourier Transforms I discovered. It involves double integrals mostly.
Define the Fourier Cosine Transform of $f(x)$ to be:
$$\mathcal{F}_{c}(f(x))=\frac{1}{\sqrt{2 \pi}}\int_{-\infty}^{\infty} f(y) \cos(xy) \ dy.$$ One can see that $\mathcal{F}_c$ is self-adjoint by checking the definition using the inner product: $$\langle f(x), g(x) \rangle= \int_{\mathbb{R}} f(x)g(x) \ dx. $$ The definition more specifically is $$\left \langle \mathcal{F}_c(f), g \right \rangle=\left \langle f, \mathcal{F}_c (g) \right \rangle.$$ To prove it is true, expand the left hand side into a double integral, and use Fubini's theorem to get the right hand side.
We compute the inner product of $$\left \langle \mathcal{F}_c \left(\cos(x) \right), \frac{1}{\sqrt{|x|}} \right \rangle$$ in two ways.
Expanding the inner product, we get the inner product equal to $$\left \langle \sqrt{2 \pi} \delta(1-x) , \frac{1}{\sqrt{|x|}} \right \rangle= \sqrt{2 \pi},$$ from the integral property of Dirac Delta function $\delta(x).$
On the other hand, exploiting the self-adjoint property, $$\sqrt{2 \pi}=\left \langle \cos(x), \mathcal{F}_c \left( \frac{1}{\sqrt{|x|}} \right ) \right \rangle =\frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \frac{\cos(x) \cos(xy)}{\sqrt{|y|}} \ dy \ dx.$$
Apply the change of variables $$x=u, y=\frac{v}{u}$$ which has Jacobian
$$\frac{\partial(x,y)}{\partial(u,v)}= \frac{1}{u}$$ to get
$$\frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \frac{\cos(u) \cos(v)}{\sqrt{|uv|}} \ dv \ du.$$
Since the first half of the proof showed that this integral is $\sqrt{2 \pi},$ we see
$$2\pi= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} \frac{\cos(u) \cos(v)}{\sqrt{|uv|}} \ dv \ du= \left (\int_{-\infty}^{\infty} \frac{\cos(u)}{\sqrt{|u|}} \ du \right)^2.$$
So $$\sqrt{2 \pi}=\int_{-\infty}^{\infty} \frac{\cos(u)}{\sqrt{|u|}} \ du=2 \int_{0}^{\infty} \frac{\cos(u)}{\sqrt{u}} \ du. $$
As a result,
$$\frac{\sqrt{\pi}} {\sqrt{2}}= \int_{0}^{\infty} \frac{\cos(u)}{\sqrt{u}} \ du.$$ Lastly, let $u=z^2, du = 2z \ dz$ to get that
$$\frac{\sqrt{\pi}} {\sqrt{2}}= \int_{0}^{\infty} 2 \cos(z^2) \ dz,$$ so
$$\int_{0}^{\infty} \cos(z^2) \ dz =\frac{\sqrt{\pi}}{\sqrt{8}}.$$