[tex]\displaystyle\int xe^{x^2}\,\mathrm dx=\frac12\int2xe^{x^2}\,\mathrm dx[/tex]
If we take [tex]y=x^2[/tex], then [tex]\mathrm dy=2x\,\mathrm dx[/tex], and we can write the above integral as
[tex]\displaystyle\frac12\int e^y\,\mathrm dy=\frac12e^y+C[/tex]
and undoing the substitution, we end up with
[tex]\displaystyle\int xe^{x^2}\,\mathrm dx=\frac12e^{x^2}+C[/tex]