Integral $\int_0^1 x^n\, \text{li}(x) \, dx$ Mathematica suggests that integrating the Logarithamic Integral, $\text{li}(x)=\int_0^x \frac{dt}{\log t}$, multiplied by $x^n$, between the limits $0$ and $1$ leads to the following result
$$\int_0^1 x^n\, \text{li}(x) \, dx= - \frac{\log(n + 2)}{(n + 1)}$$
(See this question for how this improper integral was found)
Does anyone recognise this result from the mathematical literature or know of a straight forward proof?  
I don't fully understand how Mathematica arrives at this result, particularly in respect of the improper limit of the integral at $1$. 
 A: We can integrate by parts to solve it, however pay attention that we run into divergence issues if we take $\left(\frac{x^{n+1}}{n+1}\right)'=x^n$.
To avoid that we will go with: $\left(\frac{x^{n+1}-1}{n+1}\right)'=x^n$.
$$I(n)=\int_0^1 \left(\frac{x^{n+1}-1}{n+1}\right)'\text{li}(x) dx\overset{}=\underbrace{\left(\frac{x^{n+1}-1}{n+1}\right)\text{li}(x)\bigg|_0^1}_{=0} -\frac{1}{n+1}\int_0^1 \frac{x^{n+1}-1}{\ln x}dx$$
Here's an elementary approach for the last integral in order to get $\ln(n+2)$ and the result follows.
A: First use the integral definition of li(x) to get
$$\int_{0}^{1} x^n li(x) dx = \int_{0}^{1} \int_{0}^{x} \frac{x^n}{\ln(t)} dt dx$$
Next switch the order of integration to get
$$\int_{0}^{1} \frac{1}{\ln(t)}\int_{t}^{1} x^n dx dt$$
The inner integral is fairly simple and the result of the integral is $\frac{1-t^{n+1}}{n+1}$
Now the problem reduces to
$$-\frac{1}{n+1}\int_{0}^{1} \frac{t^{n+1}-1}{\ln(t)} dt$$
We will now show that the integral evaluates to $\ln(n+2)$. We will let f(n) be the integral and differentiate it to make it simpler.
$$f'(n) = \int_{0}^{1} \frac{1}{\ln(t)} \frac{d}{dn} \left( t^{n+1} - 1 \right) dt = \int_{0}^{1} \frac{t^{n+1} \ln(t)}{\ln(t)} dt = \int_{0}^{1} t^{n+1} dt$$
It is easy to show that this integral has the value $\frac{1}{n+2}$. Now we have
$$f'(n) = \frac{1}{n+2} \rightarrow f(n) = \ln(n+2)+C$$
To find C, we will look at f(-1) which is
$$f(-1) = \int_{0}^{1} \frac{t^0 - 1}{\ln(t)} dt = 0$$
But also
$$f(-1) = \ln(-1+2)+C = C$$
Therefore C = 0 and $f(n) = \ln(n+2)$, giving the final result of this integral as
$$\int_{0}^{1} x^n li(x) dx = -\frac{\ln(n+2)}{n+1}$$
