You should learn the IBP formula:
# int u(dv)/dxdx=uv - int v (du)/dxdx #
So essentially we are looking for one function that simplifies when it is differentiated, and one that simplifies when integrated (or at least is integrable).
In this case we ca already integrate #x# so we use IBP to integrate #ln(x)^2#, we also need to know that #int lnxdx=xlnx-x# (either learn or use IBP):
Let # {(u=lnx, => ,(du)/dx=1/x),((dv)/dx=lnx,=>,v =xlnx-x ):}#
Then IBP gives;
# int lnx lnx dx=lnx(xlnx-x) - int (xlnx-x)1/xdx #
# :. int (lnx)^2 dx = x(lnx)^2 - xlnx - int (lnx-1)dx #
# :. int (lnx)^2 dx = x(lnx)^2 - xlnx - (xlnx-x-x) #
# :. int (lnx)^2 dx = x(lnx)^2 - xlnx + xlnx +2x #
And so we have:
# :. int (lnx)^2+x dx = x(lnx)^2 +2x +1/2x^2+C#