I have the following integral,$$\int (1-2x^2y^2)e^{-x^2y^2}dx$$It seems expanding the integrand and separating the integral is not a good idea since $\int e^{-x^2}dx$ has no elementary solution based on this post. I'm not sure how to proceed evaluating this integral. I know the answer is $xe^{-x^2y^2}+C$ and I checked it by taking derivative ( moving backward) hoping some idea comes to my mind. But I'm not sure which integral technique should I use to get this result.
2 Answers
First substitute $u=xy \Rightarrow du=ydx \Rightarrow dx=\frac{du}y$ giving
$$ I=\int(1-2x^2y^2)e^{-x^2y^2}\mathrm{d}x= \int \frac{(1-2u^2)e^{-u^2}}{y}\mathrm{d}u. $$ Then integrate by parts \begin{align*} I &= \int \frac{(1 - 2u^2) e^{-u^2}}{y} \mathrm{d}u \\ &= -\int \frac{2u^2e^{-u^2}\mathrm{d}u}y{} + \int \frac{e^{-u^2}}{y} \mathrm{d}u\, \\ &= -\int \frac{2u^2e^{-u^2}}{y}\mathrm{d}u + \left[ \frac{u e^{-u^2}}{y} + \int \frac{2u^2 e^{-u^2}}{y} \mathrm{d}u \right] \\ & = \frac{u e^{-u^2}}{y} + C \\ & = xe^{-x^2y^2}+C. \end{align*}

- 10,056
Expanding the integrand does work, as the non-elementary pieces can be seen to cancel. Integrating by parts with $u=x$ and $v^\prime = xe^{-x^2y^2}$, we get: $$2y^2\int x^2e^{-x^2y^2} \mathrm{d}x = -x e^{-x^2y^2} + \int e^{-x^2y^2} \mathrm{d}x + C,$$ which rearranges to the desired form: $$\int (1-2x^2y^2)e^{-x^2y^2} \mathrm{d}x = xe^{-x^2y^2}+C.$$

- 193