Home » Blog » Find the integral of (log x)2

Find the integral of (log x)2

Evaluate the following integral:

    \[ \int (\log x)^2 \, dx. \]


We use integration by parts, defining

    \begin{align*}  u &= (\log |x|)^2 & du &= \frac{2 \log x}{x} \, dx \\  dv &= dx & v &= x. \end{align*}

First, we recall that \int \log x \, dx was computed in Example 2 on p. 235 of Apostol which gave

    \[ \int \log x \, dx = x \log |x| - x + C. \]

Then we have,

    \begin{align*}  \int (\log x)^2 \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= x (\log |x|)^2 - \int 2 \log x \, dx \\  &= x (\log |x|)^2 - 2(x \log |x| - x) + C \\  &= x (\log |x|)^2 - 2x \log |x| + 2x + C. \end{align*}

4 comments

  1. Nitesh Pandey says:

    Not satisfied by this solution please solve it in easy way that can be understood easily using formula
    ( “|” it willl be the sign of integration because there is no actual sign of integratio in mobile phones so please be understood)
    Formula:-
    u|vdx-(|du/dx |vdx) dx
    This formula is given in elements maths of 12th class.
    Thank You
    Nitesh Pandey

Point out an error, ask a question, offer an alternative solution (to use Latex type [latexpage] at the top of your comment):