Integrate indefinite integral How to integrate 

$$\int x(1+x^2)e^{x^2}\log x dx$$

It seems too long to integrate by parts (already tried without success) so i don’t what to do. Substitution doesn’t seem helpful neither. 
Thanks for your help. 
 A: Following Jaideep's first hint, let $t=x^2$. Then
$$\int x\,(1+x^2)\,e^{x^2}\log x\,dx
  = \frac{1}{4}\int (1+t)\,e^t\log t\, dt.$$
(One factor of 2 is from $d(e^{x^2}) = 2x\,e^{x^2}$, the other is from
$\log x^2 = 2\log x$.)
We try integrating by parts:
\begin{align*}
 u &= (1+t)\log t                              & dv &= e^t\,dt \\
du &= \left(\log t + 1 + \frac{1}{t}\right) dt &  v &= e^t
\end{align*}
\begin{align}
\int (1+t)\,e^t\log t\, dt &= (1+t)\,e^t\log t
  - \int \left(\log t + 1 + \frac{1}{t}\right)e^t\,dt \\
  &= (1+t)\,e^t\log t - e^t - \int e^t\log t\,dt-\int\frac{e^t}{t}\,dt.
\end{align}
Now it happens that the second integral there doesn't have an elementary expression.  But if we integrate $\int e^t\log t\,dt$ by parts, we get a happy accident:
\begin{align*}
 u &= \log t       & dv &= e^t\,dt \\
du &= \frac{dt}{t} &  v &= e^t
\end{align*}
$$
\int e^t\log t\,dt = e^t\log t - \int\frac{e^t}{t}\,dt.
$$
We still can't evaluate that last integral, but it disappears when we substitute back:
\begin{align*}
\int (1+t)\,e^t\log t\,dt &= (1+t)\,e^t\log t - e^t - e^t\log t + C\\
 &= e^t(t\log t - 1) + C
\end{align*}
and
\begin{align*}
\int x(1+x^2)e^{x^2}\log x\,dx
  &= \frac{e^{x^2}}{4}(x^2\log x^2 - 1) + C \\
  &= \boxed{\frac{x^2\,e^{x^2}\log x}{2} - \frac{e^{x^2}}{4} + C}.
\end{align*}
The broader lesson here, for math (and life in general?): if a problem breaks down into parts and some of them seem intractable, work on the other parts.  Sometimes the nasty pieces take care of themselves!
A: Hint : Let $x^2=t$.
And then use that $$\int e^t(f(t)+f'(t)) {\rm d} t= e^t f(t) +\rm C$$
