Primitive of Square of Logarithm of x

Theorem

 * $\displaystyle \int \ln^2 x \ \mathrm d x = x \ln^2 x - 2 x \ln x + 2 x + C$

Proof
With a view to expressing the primitive in the form:
 * $\displaystyle \int u \frac {\mathrm d v}{\mathrm d x} \ \mathrm d x = u v - \int v \frac {\mathrm d u}{\mathrm d x} \ \mathrm d x$

let:

and let:

Then: