integrate $\int(\ln{x})^2dx$

Solution:


To integrate this function, we use integration by parts(IBP) which is



$\int{u}dv=uv-\int{v}du$

let $u=(\ln{x})^2$ and $dv=dx$ so that we can integrate dv to get v.

$\int{dv}=\int{dx}\Rightarrow{v}=x$ and $du=\frac{2\ln{x}}{x}dx$.

substitute into the integration by parts formula


$=x(\ln{x})^2-2\int\ln{x}dx.............(1)$

we carry out integration by parts again in eqn(1)

let $u=\ln{x}$ and $\int{dv}=\int{dx}$

$du=\frac{1}{x}dx$ and $v=x$

substitute $du$ and $v$ into the integration by parts formula yields

$=x\ln{x}-\int{x}.\frac{1}{x}dx$

$=x\ln{x}-\int{1}dx$

$=x\ln{x}-x$...................(2)

substitute (2) into the integral part of (1)

$=x(\ln{x})^2-2[x\ln{x}-x]+c$


where c is the constant of integration.