[tex]I = \int-xe^{x^2} dx[/tex]
Notice this integral has [tex]x^2[/tex] and [tex]x[/tex] in it. Since [tex]\frac{d}{dx}(x^2)=2x [/tex] this means we can use substitution to make this integral much simpler.
PRO-TIP: If an integral contains both some function of x, f, and it's derivative [tex] \frac{df}{dx} [/tex]. Choose u=f(x).
In our case we choose [tex]u=x^2 \Rightarrow \frac{du}{dx} = 2x \Rightarrow dx = \frac{1}{2x} du[/tex]. So the integral becomes [tex]I= \int -xe^u \frac{1}{2x} du= -\frac{1}{2} \int e^u du = -\frac{1}{2} e^u +C = -\frac{1}{2} e^{x^2} +C[/tex]