Home » Blog » Find the integral of x2 log2x

Find the integral of x2 log2x

Evaluate the following integral:

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


First, we want to integrate by parts, so define

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

Then, we integrate by parts to obtain

    \begin{align*}  \int x^2 \log^2 x \, dx &= \int u \, dv \\  &= uv - \int v \, du\\  &= \frac{1}{3}x^3 \log^2 |x| - \frac{2}{3} \int x^2 \log x \, dx \end{align*}

From the previous exercise (Section 6.9 Exercise #22) we know that for n \neq -1

    \[ \int x^n \log (ax) \, dx = \frac{x^{n+1}}{n+1}\log |ax| - \frac{x^{n+1}}{(n+1)^2} + C. \]

Since we want to evaluate the integral of x^2 \log x we have n = 2 and a = 1. Therefore, by the formula,

    \[ \int x^2 \log x \, dx = \frac{x^3}{3} \log |x| - \frac{x^3}{9} + C. \]

Now, plugging this back into the formula above,

    \begin{align*}  \int x^2 \log^2 x \, dx &= \frac{1}{3}x^3 \log^2 |x| - \frac{2}{3} \int x^2 \log x \, dx \\  &= \frac{1}{3} x^3 \log^2 |x| - \frac{2}{3} \left( \frac{x^3}{3} \log |x| - \frac{x^3}{9} \right) + C \\  &= \frac{1}{3} x^3 \log^2 |x| - \frac{2x^3}{9} \log |x| - \frac{2x^3}{27}  + C \\  &= \frac{x^3}{3} \left( \log^2 |x| - \frac{2}{3} \log |x| + \frac{2}{9} \right) + C. \end{align*}

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