How to solve $\int (2x^2 + 1) e^{x^2} \, dx$ using elementary integration and integration by parts? $$\int (2x^2+1)e^{x^2} \, dx$$


It's part of my homework, and I have tried a few things but it seems to lead to more difficult integrals. I'd appreciate a hint more than an answer but all help is valued.
Start by expanding the integrand.

$$\begin{align}
I&amp;=\int \left(2x^2e^{x^2}+e^{x^2}\right)\,dx\\
&amp;=\int 2x^2e^{x^2}\,dx+\int {e^{x^2}}\,dx\tag{a}\\
&amp;=x e^{x^2}-\int 2x^2 e^{x^2}\,dx+\int 2x^2 e^{x^2}\,dx\\
&amp;=x e^{x^2}+C
\end{align}$$

$(\text{a})$: Use integration by parts on the second integral with $u=e^{x^2}$ and $dv=dx$.
Here is a hint; you can not analytically evaluate $\int \exp(x^2) dx$. 
Read more about that on wiki.
So your final answer should contain terms with $\int \exp(x^2) dx$.