Integral of $$$1 - e^{- \frac{y^{2}}{2}}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \left(1 - e^{- \frac{y^{2}}{2}}\right)\, dy$$$.
Solution
Integrate term by term:
$${\color{red}{\int{\left(1 - e^{- \frac{y^{2}}{2}}\right)d y}}} = {\color{red}{\left(\int{1 d y} - \int{e^{- \frac{y^{2}}{2}} d y}\right)}}$$
Apply the constant rule $$$\int c\, dy = c y$$$ with $$$c=1$$$:
$$- \int{e^{- \frac{y^{2}}{2}} d y} + {\color{red}{\int{1 d y}}} = - \int{e^{- \frac{y^{2}}{2}} d y} + {\color{red}{y}}$$
Let $$$u=\frac{\sqrt{2} y}{2}$$$.
Then $$$du=\left(\frac{\sqrt{2} y}{2}\right)^{\prime }dy = \frac{\sqrt{2}}{2} dy$$$ (steps can be seen »), and we have that $$$dy = \sqrt{2} du$$$.
Thus,
$$y - {\color{red}{\int{e^{- \frac{y^{2}}{2}} d y}}} = y - {\color{red}{\int{\sqrt{2} e^{- u^{2}} d u}}}$$
Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=\sqrt{2}$$$ and $$$f{\left(u \right)} = e^{- u^{2}}$$$:
$$y - {\color{red}{\int{\sqrt{2} e^{- u^{2}} d u}}} = y - {\color{red}{\sqrt{2} \int{e^{- u^{2}} d u}}}$$
This integral (Error Function) does not have a closed form:
$$y - \sqrt{2} {\color{red}{\int{e^{- u^{2}} d u}}} = y - \sqrt{2} {\color{red}{\left(\frac{\sqrt{\pi} \operatorname{erf}{\left(u \right)}}{2}\right)}}$$
Recall that $$$u=\frac{\sqrt{2} y}{2}$$$:
$$y - \frac{\sqrt{2} \sqrt{\pi} \operatorname{erf}{\left({\color{red}{u}} \right)}}{2} = y - \frac{\sqrt{2} \sqrt{\pi} \operatorname{erf}{\left({\color{red}{\left(\frac{\sqrt{2} y}{2}\right)}} \right)}}{2}$$
Therefore,
$$\int{\left(1 - e^{- \frac{y^{2}}{2}}\right)d y} = y - \frac{\sqrt{2} \sqrt{\pi} \operatorname{erf}{\left(\frac{\sqrt{2} y}{2} \right)}}{2}$$
Add the constant of integration:
$$\int{\left(1 - e^{- \frac{y^{2}}{2}}\right)d y} = y - \frac{\sqrt{2} \sqrt{\pi} \operatorname{erf}{\left(\frac{\sqrt{2} y}{2} \right)}}{2}+C$$
Answer
$$$\int \left(1 - e^{- \frac{y^{2}}{2}}\right)\, dy = \left(y - \frac{\sqrt{2} \sqrt{\pi} \operatorname{erf}{\left(\frac{\sqrt{2} y}{2} \right)}}{2}\right) + C$$$A