You are currently viewing What is the integral of ln^2(x)?
integral of ln^2(x)

What is the integral of ln^2(x)?

The integral of \ln^2(x) is x\ln^2(x) - 2x\ln(x) + 2x + C.

Solution. We want to determine the integral of \ln^2(x), i.e.:
\begin{align*}
\int \ln^2(x) dx.
\end{align*}
We need to integrate by parts; that is, we will use the following formula:
\begin{align*}
\int U dV = UV - \int VdU,
\end{align*}
where U = \ln^2(x) and dU = 1 \cdot dx. Then we get dU = \frac{2\ln(x)}{x} which we saw here, and V = x. So we get:
\begin{align*}
\int \ln^2(x) dx &= \ln^2(x)\cdot x - \int x \cdot \frac{2\ln(x)}{x}dx \\
&= x\ln^2(x) - \int 2\ln(x) dx. 
\end{align*}
Now we want to integrate 2\ln(x) into parts, i.e.: \int 2\ln(x) dx. Let U' = \ln(x) and dV' = 2dx. Then we saw here that dU' = \frac{1}{x}, and V' = 2x. So we get:
\begin{align*}
\int \ln^2(x) dx &= x\ln^2(x) - \int 2\ln(x) dx \\
&= x\ln^2(x) - (2x\ln(x) - \int \frac{2x}{x} dx )\\
&= x\ln^2(x) - 2x\ln(x) + \int 2 dx \\
&= x\ln^2(x) - 2x\ln(x) + 2x + C.
\end{align*}
Therefore, the integral of \ln^2(x) is x\ln^2(x) - 2x\ln(x) + 2x + C.

Leave a Reply