The following answer to the question $$\int z(\ln z)^2\, dz $$ is given by
$$\frac{1}{2}(z^2(\ln z)^2-z^2(\ln z)+ \frac{z^2}{2})+ C. $$
I first used a substitution of $u=z \ln z$ as $\ln z$ cannot be integrated cleanly (and so Integration by parts is inapplicable), reducing the integral to $$\int z \ln z (\ln z+1) \, dz - \int z \ln z \, dz.$$
Still, $\ln z$ cannot be integrated cleanly so did a 2nd substitution of $y= \ln z$ which will reduce the integral(after applying both substitutions) into $$\int u\,du - \int y e^{2y} \, dy$$ Then I proceeded with Integration by parts.
If the power of $\ln z$ was any larger, it would be tedious to use n substitutions and then proceed with integration by parts. Does anyone have an alternative solution to this problem?
$$I={\displaystyle\int}x\ln^2\left(x\right)\,\mathrm{d}x$$ Integration by parts
$$I=\dfrac{x^2\ln^2\left(x\right)}{2}-{\displaystyle\int}x\ln\left(x\right)\,\mathrm{d}x$$
$$I_1={\displaystyle\int}x\ln\left(x\right)\,\mathrm{d}x$$ again apply integration by parts
$$I_1=\dfrac{x^2\ln\left(x\right)}{2}-{\displaystyle\int}\dfrac{x}{2}\,\mathrm{d}x=\dfrac{x^2\ln\left(x\right)}{2}-\dfrac{x^2}{4}$$