Answer
$$x{\left( {\ln x} \right)^2}{\text{ }} - 2x\ln x + 2x + C$$
Work Step by Step
$$\eqalign{
& \int {{{\left( {\ln x} \right)}^2}dx} \cr
& {\text{substitute }}u = {\left( {\ln x} \right)^2}{\text{ }} \cr
& {\text{chain rule}} \cr
& du = 2\left( {\ln x} \right)\left( {\frac{1}{x}} \right)dx \cr
& du = \frac{{2\ln x}}{x} \cr
& dv = dx,{\text{ }}v = x \cr
& {\text{applying integration by parts}} \cr
& \int {udv} = uv - \int {vdu} \cr
& {\text{, we have}} \cr
& \int {{{\left( {\ln x} \right)}^2}dx} = x{\left( {\ln x} \right)^2}{\text{ }} - \int {\left( x \right)\left( {\frac{{2\ln x}}{x}} \right)dx} \cr
& \int {{{\left( {\ln x} \right)}^2}dx} = x{\left( {\ln x} \right)^2}{\text{ }} - 2\int {\ln xdx} \cr
& \cr
& {\text{substitute }}u = \ln x,{\text{ }}du = \frac{1}{x}dx \cr
& dv = dx,{\text{ }}v = x \cr
& {\text{ integration by parts}} \cr
& \cr
& \int {{{\left( {\ln x} \right)}^2}dx} = x{\left( {\ln x} \right)^2}{\text{ }} - 2\left( {x\ln x - \int {x\left( {\frac{1}{x}} \right)dx} } \right) \cr
& \int {{{\left( {\ln x} \right)}^2}dx} = x{\left( {\ln x} \right)^2}{\text{ }} - 2x\ln x + 2\int {dx} \cr
& {\text{find antiderivative}} \cr
& \int {{{\left( {\ln x} \right)}^2}dx} = x{\left( {\ln x} \right)^2}{\text{ }} - 2x\ln x + 2x + C \cr} $$