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 ?
 A: If you absolutely want to write the integration in the form of an integration by part use:
$$
v'=xe^{x^2} \quad \rightarrow \quad v=\frac{1}{2}e^{x^2}
$$
and
$$
u=1 \quad \rightarrow \quad u'=0
$$
A: 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$$
A: Alternatively, with the change of variable
$$
u=e^{x^2}, \qquad du =2xe^{x^2},
$$ one has 
$$
\int xe^{x^2}dx=\frac12\int du
$$ which is easy to evaluate.
A: Take $e^{x^2}$ as the first function and apply rule of by parts, you get 
$\int e^{x^2}x dx =e^{x^2}\frac{x^2}{2}-\int x^3.e^{x^2}dx$.....$(A)$
Now $\int x^3e^{x^2}dx=\frac{1}{2}\int t.e^t dt$ where $x^2=t$ and $2xdx=dt$ (Assuming that your teacher didn't mean to completely reject substitution).
On integration, it gives  $\frac{1}{2}e^t(t-1)$ or $\frac{1}{2}e^{x^2}(x^2-1)$.
Substitute it in $(A)$ to get the answer.
