Home » Blog » Prove a recursion formula for the integral of xm logn x

Prove a recursion formula for the integral of xm logn x

Prove the following recursion formula holds:

    \[ \int x^m \log^n x \, dx = \frac{x^{m+1} \log^n x}{m+1} - \frac{n}{m+1} \int x^m \log^{n-1} x \, dx. \]

Apply this formula to find the solution of

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


Proof. To obtain this recursion formula we proceed by integrating by parts. To that end, let

    \begin{align*}  u &= \log^n x & du &= \frac{n \log^{n-1} x}{x} \, dx \\  dv &= x^m \, dx & v &= \frac{x^{m+1}}{m+1}.  \end{align*}

Then we have

    \begin{align*}  \int x^m \log^n x \, dx &= \int u \, dv \\  &= uv - \int v \, du \\  &= \frac{x^{m+1}}{m+1} \log^n x - \frac{n}{m+1} \int x^{m+1} \frac{\log^{n-1} x}{x} \, dx \\  &= \frac{x^{m+1}}{m+1} \log^n x - \frac{n}{m+1} \int x^m \log^{n-1} x \, dx. \qquad \blacksquare \end{align*}

Now, to find the solution of

    \[ \int x^3 \log^3 x \, dx \]

we apply the formula with n = m = 3. This gives us,

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

Next we apply the formula to the resulting integral with m = 3 and n = 2. Therefore we have

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

Finally, we apply the formula to the integral above with m = 3 and n = 1 to obtain,

    \begin{align*}  \int x^3 \log^3 x \, dx &= \frac{x^4}{4} \log^3 |x| - \frac{3x^4}{16} \log^2 |x| + \frac{3}{8} \int x^3 \log x \, dx \\  &= \frac{x^4}{4} \log^3 |x| - \frac{3x^4}{16} \log^2 |x| + \frac{3}{8} \left( \frac{x^4}{4} \log |x| - \frac{1}{4} \int x^3 \, dx \right) \\  &= \frac{x^4}{4} \log^3 |x| - \frac{3x^4}{16} \log^2 |x| + \frac{3x^4}{32} \log |x| - \frac{3x^4}{128} + 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):