Integrate $e^{-\frac{y^2}{2}}\left(\frac{1}{y^2}+1\right)$

I'm trying to find $$\displaystyle \int{e^{-\frac{y^2}{2}}} \left(\frac{1}{y^2}+1\right)dy$$ I tried using integration by parts and some substitutions, but nothing seem to work.

The answer is $\displaystyle -\frac{{e^{-\frac{y^2}{2}}}}{y}$.

• Well for a start, you could derive the answer and see that it fits. – mvggz Oct 23 '14 at 8:02
• Galc127 I think that there should be a negative sign in the answer. – Sherlock Holmes Oct 23 '14 at 8:05
• @SherlockHolmes, absolutely right, thanks for noticing. – Galc127 Oct 23 '14 at 8:05

First split the integrand into $$\int \frac{e^{\frac{-y^2}{2}}}{y^2}dy + \int e^{\frac{-y^2}{2}}dy$$
Using by parts on the first integral, $$\int \frac{e^{\frac{-y^2}{2}}}{y^2} dy=-\frac{e^{\frac{-y^2}{2}}}{y}-\int e^{\frac{-y^2}{2}}dy$$