Can the horseshoe prior be expressed analytically? My question is about the horseshoe prior, described by Carvalho et al. It is specified as:
$$
\beta_i|\lambda_i,\tau\sim\mathcal N(0,\tau^2\lambda_i^2)\\
\lambda_i\sim\mathcal C^+(0,1)
$$
I have read a few sources (including this question) implying that the horseshoe prior cannot be expressed in closed form, that is, we cannot integrate over $\lambda_i$ and find a closed form expression for $f(\beta_i|\tau)$. However, with some help from Wolfram Alpha, I found this:
$$f(\beta_i|\tau)=\exp\left(\frac{\beta_i^2}{2\tau^2}\right)\text{erfc}\left(\left|\frac{\beta_i}{\tau\sqrt2}\right|\right)$$
Is this result correct? Is it considered a closed form expression? Also, can this be used to improve MCMC sampling, since one does not need to sample $\lambda_i$?
Thanks!
Edit: I am afraid this result is wrong because the original paper by Carvalho has a plot showing $f(\beta|\tau)\rightarrow\infty$ when $\beta\rightarrow0$, while the equation I got implies $f(\beta|\tau)\rightarrow1$. But I cannot find my error!

The normal conditional density's normalizing constant is not free of lambda, so Wolfram is integrating the wrong thing.
$$
 (2\pi)^{-1}\int_0^\infty \underbrace{(2\pi\tau^2\lambda^2)^{-1/2}}_{\text{this part}}\exp\left[ - \frac{\beta^2}{2\tau^2\lambda^2} \right](1 + \lambda^2)^{-1} d \lambda.
$$
