Can anyone check if I'm doing these correct

**1.** $\displaystyle \int{\frac{(lnx)^2}{x}dx}$

$\displaystyle U = lnx , DU = \frac{dx}{x}$

$\displaystyle \int{u}{du}$

$\displaystyle = \frac{1}{2}(u^2)$

$\displaystyle = \frac {1}{2}(lnx)^2$

**2.** $\displaystyle \int\frac{x}{(x^2+2)^2}dx$

$\displaystyle U = x^2 + 1 , \frac{1}{2}DU = xdx$

$\displaystyle = \frac{1}{1}\int\frac{1}{u^2}du$

$\displaystyle = \frac{1}{2}ln(u^2) $

$\displaystyle = \frac{1}{2}ln|(x^2)+1|$

I know I made mistakes I just don't know where.