Đặt: \(\left\{{}\begin{matrix}\ln x=u\\\left(x+2\right)dx=dv\end{matrix}\right.\) \(\Rightarrow\left\{{}\begin{matrix}\dfrac{1}{x}dx=du\\\dfrac{1}{2}x^2+2x=v\end{matrix}\right.\)
⇒ \(\int\left(x+2\right)\ln xdx=\ln x\left(\dfrac{1}{2}x^2+2x\right)-\int\left(\dfrac{1}{2}x^2+2x\right)\dfrac{1}{x}dx\)
\(=\ln x\left(\dfrac{1}{2}x^2+2x\right)-\dfrac{1}{6}x^3-x^2+C\)