Home » Blog » Find the integral of xn log (ax)

Find the integral of xn log (ax)

Evaluate the following integral:

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


Here we want to use integration by parts. To that end we define,

    \begin{align*}  u &= \log (ax) & du &= \frac{1}{x} \, dx \\  dv &= x^n \, dx & v  &= \frac{x^{n+1}}{n+1}, \end{align*}

if n \neq -1.

Therefore, integrating by parts we obtain the integral for all n \neq -1.

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

Now, for the case that n = -1 we have

    \[ \int x^n \log (ax) \, dx = \int \frac{\log (ax)}{x} \, dx. \]

Since \frac{1}{x} \, dx is the derivative of \log (ax) we make the substitution u = \log (ax) and du = \frac{dx}{x} to obtain

    \begin{align*}  \int \frac{\log(ax)}{x} \, dx &= \int u \, du \\  &= \frac{1}{2} u^2 + C \\  &= \frac{1}{2} (\log |ax|)^2 + 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):