# Solving a marginalization integral involving exponential distributions

I'm trying to solve a marginalization integral $$\int p(y,w) dw$$ in order to compute the density $p(y)$.

I assumed the following model: $$y = (u+w)^2 + v$$ in which $w$ and $v$ are independent and both follow an exponential distribution with rate equal to 1, and $u$ is a known real number. Then one can compute \begin{aligned} \int_\mathbb{R} p(y,w) dw &= \int_\mathbb{R} p(y|w)p(w) dw\\ &= \int_\mathbb{R}{\bf{1}}_{\{(y-(u+w)^2)\geq0\} \cap\{w\geq0\}}\exp(-(y-(u+w)^2))\exp(-w) dw \end{aligned}

The question is whether this integral can be solved analytically? does it have a closed form expression?

\begin{aligned} \int_\mathbb{R} p(y,w) dw &= \int_\mathbb{R} p(y|w)p(w) dw\\ &= \int_\mathbb{R}{\bf{1}}_{\{y-(u+w)^2\geq0\} \cap\{w\geq0\}}\exp(-(y-(u+w)^2))\exp(-w) dw\\ &=\int_\mathbb{R}{\bf{1}}_{\{\sqrt{y}-(u+w)\geq0\} \cap\{w\geq0\}}\exp(-(y-(u+w)^2))\exp(-w) dw\\ &=\int_{0}^{\max\{0,\sqrt{y}-u\}}\exp(-y+(u+w)^2-w) dw\\ &=\exp(-y)\int_{0}^{\max\{0,\sqrt{y}-u\}}\exp\{(u+w)^2-w\} dw\\ &=\exp(-y+u^2)\int_{0}^{\max\{0,\sqrt{y}-u\}}\exp\{w^2+(2u-1)w\} dw\\\end{aligned} The second term is of the form $$\int_a^b \exp\{x^2\}\text{d}x$$ and thus does not allow for a closed form expression, other than calling the integral a special function, connected with the imaginary error function.