<s>[INST] Calculate integral $\int^{+\infty}_0 \frac{e^{-x^2}}{(x^2+\frac{1}{2})^2} dx$? I've posted a similar integral earlier, in which the Goodwin-Staton Integral is involved, making the integral unsolvable. Now I make a little modification to make it solvable and give my answer below.
 [/INST] $$\begin{array}\ \int^{+\infty}_0 \frac{e^{-x^2}}{(x^2+\frac{1}{2})^2} dx &= 2\bigg[\int^{+\infty}_0 \frac{e^{-x^2}}{x^2+\frac{1}{2}} dx - \int^{+\infty}_0 \frac{x^2e^{-x^2}}{(x^2+\frac{1}{2})^2} dx\bigg]\\ &= 2\bigg[\int^{+\infty}_0 \frac{e^{-x^2}}{x^2+\frac{1}{2}} dx + \frac{1}{2}\int^{+\infty}_0xe^{-x^2}d(\frac{1}{x^2+\frac{1}{2}})\bigg]\\ &= 2\bigg[\int^{+\infty}_0 \frac{e^{-x^2}}{x^2+\frac{1}{2}} dx - \frac{1}{2}\int^{+\infty}_0\frac{1-2x^2}{x^2+\frac{1}{2}}e^{-x^2}dx\bigg]\\ &= 2\int^{+\infty}_0e^{-x^2}dx\\ &= \sqrt{\pi} \end{array}$$
</s>