Find the following integral: $\int {{{(\ln x)}^2}} dx$ by using the method of integration by parts 
Find $\int {{{(\ln x)}^2}} dx$ by using the method of integration by parts.

My attempt:
$$\eqalign{
  & \int {{{(\ln x)}^2}} dx = \int {2\ln x} dx  \cr 
  & u = \ln x,{\rm{ }}{{du} \over {dx}} = {1 \over x}  \cr 
  & {{dv} \over {dx}} = 2,{\rm{ }}v = 2x  \cr 
  & so:  \cr 
  & \int {{{(\ln x)}^2}} dx = 2x\ln x - \int {2x \times {1 \over x}} dx  \cr 
  &  = 2x\ln x - 2x + C \cr} $$

This is the wrong answer, the right answer is:
$$x{(\ln x)^2} - 2x\ln x + 2x + C$$
What have I missed?

By integration by parts,
$$\int (\ln(x))^2 dx = x (\ln(x))^2 - \int x d \left((\ln(x))^2\right)$$
$$\int x d \left((\ln(x))^2\right) = \int x \cdot 2 \ln(x) \dfrac{dx}x = 2\int \ln(x)dx$$
Now again by integration by parts, we have
$$\int \ln(x)dx = \ln(x) \cdot x - \int x \cdot \dfrac{dx}x = x \ln(x) - x$$
Putting all this together, we get
$$\int (\ln(x))^2 dx = x (\ln(x))^2-2x\ln(x) + 2x + \text{constant}$$
