# Evaluate $\int x^2e^{x^2} dx$

Evaluate $\displaystyle\int x^2e^{x^2} dx$

Try($1$)(integral by parts)(unsuccessful)

$$\displaystyle\int x^2e^{x^2}dx=x^2\left(\int e^{x^2} dx\right)-2\int x\left(\int e^{x^2} dx\right)dx$$

I don't know how to calculate $\left(\displaystyle\int e^{x^2} dx\right)$, as well.

Try($2$)(integral by parts)(unsuccessful)

$$\displaystyle\int x^2e^{x^2}dx=e^{x^2}x^3/3-2/3\int x^4e^{x^2}dx$$$$\rightarrow$$$$\int x^4e^{x^2}dx=x^5e^{x^2}/5-2/5\int x^6e^{x^2}dx$$$$\vdots$$

Try($3$)(Integration by substitution)(unsuccessful)

$$x=\sqrt t$$$$\displaystyle\int x^2e^{x^2}dx=1/2\int \sqrt t\;e^t\; dt$$ Let's apply "integral by parts"

$$\int \sqrt t\;e^t\; dt=\sqrt t\;e^t-1/2\int\dfrac{e^t}{\sqrt t}dt$$$$\vdots$$

Try($4$)(Integration by substitution(trigonometric))(unsuccessful)

$$x=\sin u$$ $$\displaystyle\int x^2e^{x^2}dx=\int e^{\sin^2 u}\sin^2 u\cos u du$$

• Are you looking for a closed-form solution? According to Maple, it looks like there isn't one. – TorsionSquid Apr 1 '17 at 19:49
• $x^n e^{x^2}$ has an elementary primitive only if $n$ is odd. – Jack D'Aurizio Apr 1 '17 at 19:55
• Yes@TorsionSquid How you can say? Mr.@JackD'Aurizio – user2312512851 Apr 1 '17 at 19:58
• $\displaystyle\int e^{\sin^2 u}\sin^2 u\cos u du$ in there I tried $e^{\sin u}=h$ substitution, I think we can get something there. – user2312512851 Apr 1 '17 at 20:09
• Since $\int e^{x^2} dx = x e^{x^2} - 2\int x^2 e^{x^2} dx$, as pointed out by several users, $\int e^{x^2}$ does not admit an elementary representation. This mean every effort to solve $\int x^2 e^{x^2} dx$ will be in vain. @Photoneaterman – user99914 Apr 1 '17 at 20:18

After integration by part you get : $$\dfrac{x\mathrm{e}^{x^2}}{2}-{\displaystyle\int}\dfrac{\mathrm{e}^{x^2}}{2}\,\mathrm{d}x$$
$${\displaystyle\int}\dfrac{\mathrm{e}^{x^2}}{2}\,\mathrm{d}x=\class{steps-node}{\cssId{steps-node-1}{\dfrac{\sqrt{{\pi}}}{4}}}{\displaystyle\int}\dfrac{2\mathrm{e}^{x^2}}{\sqrt{{\pi}}}\,\mathrm{d}x=\dfrac{\sqrt{{\pi}}\operatorname{erfi}\left(x\right)}{4}$$ Now you can finish easily.
• thanx but $\erfi (x)$ still an integral, can we make more elementary? – user2312512851 Apr 1 '17 at 19:59
• This kind of integral can't be defined in term of elementary functions. But you have a Taylor series of this function if you find it more familiar : $\operatorname{erfi}(z)= \frac{2}{\sqrt{\pi}}\sum_{n=0}^\infty\frac{z^{2n+1}}{n! (2n+1)}$ – Jennifer Apr 1 '17 at 20:04