# Integral of ln²(x)

In this post I will show you how to find the anti-derivative of the function f(x)=ln²(x).

$\int&space;\ln^2(x)\,\mathrm{d}x$

We are going to use integration by parts:

$u=\ln^2(x)\;\;\;\;\;\mathrm{d}v=\mathrm{d}x$ $\mathrm{d}u=2\frac{\ln(x)}{x}\;\;\;\;\;v=x$

Now we can write u times v minus the integral of v times du:

$x\ln^2(x)-\int&space;2\frac{\ln(x)}{x}\,x\,\mathrm{d}x$

Let’s bring out the 2 (linearity); also, the two x‘s will cancel out.

$x\ln^2(x)-2\int&space;\ln(x)\,\mathrm{d}x$

We saw here that the integral of ln(x) is equal to xln(x)-x, therefore:

$x\ln^2(x)-2\left&space;(&space;x\ln(x)-x&space;\right&space;)=x\ln^2(x)-2x\ln(x)+2x$

If you want, you can factor out the x:

$x(\ln^2(x)-2\ln(x)+2)$

Finally,

$\int&space;\ln^2(x)\,\mathrm{d}x=x(\ln^2(x)-2\ln(x)+2)+C$

That’s it!

If you liked this post give it a like and if you are interested in more integrals and derivatives, subscribe to receive notifications!

Join 31 other followers

This site uses Akismet to reduce spam. Learn how your comment data is processed.