Integration by parts $\int xe^{x^2} dx$. 
Find with integration by parts $$\int xe^{x^2} dx$$.


$$\int xe^{x^2} dx$$
Let $u(x) = x \ \ \ v^{'}(x) = e^{x^2}$ 
Now I can write the integral as $$\int xe^{x^2} dx = x \int e^{x^2} dx - \int\left(\int e^{x^2} dx \right) dx$$
Even after trying everything I am unable to solve $v^{'}(x) = e^{x^2}$ for $v(x)$. 

I can do this question substitution $u = x^2$ but I told use integration by parts to do this question. What should I do ?

Take $u=e^{x^2}$ then $du=2xe^{x^2}$ and $v=\frac{x^2}{2}$ so
$$\int xe^{x^2}dx=\frac{x^2e^{x^2}}{2}-\int x^3e^{x^2}dx$$
Take $u=e^{x^2}$ and $dv=x^3$ then
$$\int x^3e^{x^2}dx=\frac{x^4}{4}e^{x^2}-\frac{1}{2}\int x^5e^{x^2}dx$$
Similary
$$\int x^5e^{x^2}dx=\frac{x^6}{6}e^{x^2}-\frac{1}{3}\int x^7e^{x^2}dx$$
In general $$\int x^{2n+1}e^{x^2}dx=\frac{x^{2n+2}}{2n+2}e^{x^2}-\frac{1}{n+1}\int x^{2n+3}e^{x^2}dx$$
From that we can take a few terms and notice that $$\int xe^{x^2}dx=\frac{x^2}{2}e^{x^2}-\frac{x^4}{4}e^{x^2}+\frac{x^6}{12}e^{x^2}-\frac{x^8}{48}e^{x^2}+\frac{x^{10}}{240}e^{x^2}+\cdots\\\int xe^{x^2}dx=\frac{e^{x^2}}{2}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}x^{2k}}{k!}$$Now with few adjustments you'll get$$e^{-x^2}=\sum_{k=0}^\infty\frac{(-1)^kx^{2k}}{k!}=1+\sum_{k=1}^\infty\frac{(-1)^kx^{2k}}{k!}=1-\sum_{k=1}^\infty\frac{(-1)^{k+1}x^{2k}}{k!}\\\int xe^{x^2}dx=\frac{e^{x^2}}{2}\left(1-e^{-x^2}\right)=\frac{e^{x^2}}{2}+C$$
