# How do you evaluate the integral intx^nlnxdx?

May 6, 2017

For $n = - 1$: ${\left(\ln x\right)}^{2} / 2 + C$

For $n \ne - 1$: $\frac{{x}^{n + 1} \left(\left(n + 1\right) \ln x - 1\right)}{n + 1} ^ 2 + C$

#### Explanation:

$I = \int {x}^{n} \ln x \mathrm{dx}$

Use integration by parts. Let:

$\left\{\begin{matrix}u = \ln x & \implies & \mathrm{du} = \frac{1}{x} \mathrm{dx} \\ \mathrm{dv} = {x}^{n} \mathrm{dx} & \implies & v = {x}^{n + 1} / \left(n + 1\right)\end{matrix}\right. \text{ "" "" } \left(n \ne - 1\right)$

Then:

$I = \ln x \left({x}^{n + 1} / \left(n + 1\right)\right) - \int {x}^{n + 1} / \left(n + 1\right) \left(\frac{1}{x}\right) \mathrm{dx}$

$\textcolor{w h i t e}{I} = {x}^{n + 1} / \left(n + 1\right) \ln x - \frac{1}{n + 1} \int {x}^{n} \mathrm{dx}$

$\textcolor{w h i t e}{I} = {x}^{n + 1} / \left(n + 1\right) \ln x - \frac{1}{n + 1} \left({x}^{n + 1} / \left(n + 1\right)\right)$

$\textcolor{w h i t e}{I} = \frac{{x}^{n + 1} \left(\left(n + 1\right) \ln x - 1\right)}{n + 1} ^ 2 + C$

In the case where $n = - 1$, the integral is $\int \ln \frac{x}{x} \mathrm{dx}$. With the substitution $t = \ln x$ this becomes $\int t \mathrm{dt} = {t}^{2} / 2 = {\left(\ln x\right)}^{2} / 2 + C$.