Calculate $\int \log(1+\log(x))x^ndx$

How to calculate the following integral? $$\int \log(1+\log(x))x^ndx,$$ $n$ is an integer $\in N$.

• Mathematica produces $$\frac{x^{n+1} \log (\log (x)+1)-e^{-n-1} \text{Ei}((n+1) (\log (x)+1))}{n+1}.$$ – user64494 Aug 2 '14 at 16:15
• Well, for $|\log(x)| < 1$ you can use the Taylor series of $\log(1+x)$. – abnry Aug 2 '14 at 16:28

$\textbf{small hint}$ This was a direct result of the Mathematica output as shown by user* in the comments above. $$\int \log(1+\log(x))x^ndx = \int \log(\log(ex))x^ndx$$

substitute $t = ex$ we find $$\begin{eqnarray} \int \log(1+\log(x))x^ndx &=& \frac{1}{e}\int \log(\log(t))\left(\frac{t}{e}\right)^ndt \\ &=& e^{-(n+1)}\int\log(\log(t))t^ndt \end{eqnarray}$$ make another sub $\log t = u$ we find $$e^{-(n+1)}\int \log u \mathrm{e}^{(n+1)u}du$$

using the fact $$\int \mathrm{e}^{cx}\ln x = \frac{1}{c}\left(\mathrm{e}^{cx}\ln |x| - \mathrm{Ei}(cx)\right)$$ we find that with $c=n+1$ and $x = u$ $$e^{-(n+1)}\int \log u \mathrm{e}^{(n+1)u}du = e^{-(n+1)}\frac{1}{n+1}\left(\mathrm{e}^{(n+1)u}\ln |u| - \mathrm{Ei}[(n-1)u]\right)$$ and you should be able to finish off with subbing in $u = 1+ \log(x)$

• No I was just seeing that myself..I have messed up that exponential. I will fix it now. Thank you. – Chinny84 Aug 2 '14 at 16:32
• @Michael hopefully it is corrected now. Thank you again. – Chinny84 Aug 2 '14 at 16:39
• I think that the difficult part is $$\int \mathrm{e}^{cx}\ln x = \frac{1}{c}\left(\mathrm{e}^{cx}\ln |x| - \mathrm{Ei}(cx)\right)$$ Do you agree ? – Claude Leibovici Aug 2 '14 at 16:43
• How do you mean? is it with regards to "$\textbf{small hint}$"?. Or was it the wrong approach? – Chinny84 Aug 2 '14 at 16:49
• Not at all; your work is really good. I was just commenting the part I felt the most difficult (to me !!). Thanks for your answer. Cheers :-) – Claude Leibovici Aug 2 '14 at 16:58

I think it can be solved by this way $$\int \ln(1+\ln x)x^n dx$$ using integration by parts $$u=\ln(1+\ln x)\Rightarrow du=\frac{\frac{1}{x}}{1+\ln x}dx=\frac{dx}{x(1+\ln x)}\\ dv=x^ndx\Rightarrow v=\frac{x^{n+1}}{n+1}\\ \int \ln(1+\ln x)x^n dx=\ln(1+\ln x)\frac{x^{n+1}}{n+1}-\frac{1}{n+1}\int\frac{x^n}{1+\ln x}dx=\\ \frac{1}{n+1}\left[\ln(1+\ln x)x^{n+1}-\int\frac{x^n}{1+\ln x}dx\right]=\\ \frac{1}{n+1}\left[\ln(1+\ln x)x^{n+1}-\int\frac{x^n}{\ln ex}dx\right]$$ then $$\int\frac{x^n}{\ln ex}dx\\ u=\ln ex\\ e^u=ex\Rightarrow x=e^{u-1}\\ du=\frac{dx}{x}\Rightarrow dx=xdu=e^{u-1}du\\ \int\frac{x^n}{\ln ex}dx=\int\frac{(e^{u-1})^n}{u}e^{u-1}du=\int\frac{e^{nu-n}e^{u-1}}{u}du=\\ \int\frac{e^{(n+1)u}e^{-(n+1)}}{u}du=e^{-(n+1)}\int\frac{e^{(n+1)u}}{u}du=\\ e^{-(n+1)}\text{Ei}[(n+1)u]=e^{-(n+1)}\text{Ei}[(n+1)\ln ex]=e^{-(n+1)}\text{Ei}[(n+1)(1+\ln x)]$$ which gives $$\frac{\ln(1+\ln x)x^{n+1}-e^{-(n+1)}\text{Ei}[(n+1)(1+\ln x)]}{n+1}$$

• I like the fact you showed all the steps :) +1 – Chinny84 Aug 3 '14 at 10:06