How to solve this integral: $$\int_{0}^{1} \ln(1+x^n)\,dx. $$ The problem doesn't say anything about $n$ so I assume $n\in N$.

Source of the question.


closed as off-topic by RRL, clathratus, Lee David Chung Lin, Feng Shao, nmasanta Sep 4 at 1:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – RRL, Lee David Chung Lin, Feng Shao, nmasanta
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ From where is this problem? $\endgroup$ – LeBlanc Sep 3 at 18:51
  • 3
    $\begingroup$ $u = \ln(1+x^n), dv = dx, du = \frac{nx^{n-1}}{1+x^n}dx, v = x$, integrate by parts gives $\ln(2)-n\int_0^1 \frac{nx^n}{x^n+1}dx$. Do $\int_0^1 \frac{nx^n}{x^n+1}dx = \int_0^1 \frac{nx^n+n-n}{x^n+1}dx = n-n\int_0^1 \frac{1}{x^n+1}dx$. So all you need to do is $\int_0^1 \frac{1}{x^n+1}dx$. $\endgroup$ – mathworker21 Sep 3 at 18:53
  • 1
    $\begingroup$ Mathematica yields the incredibly ugly $$-\Phi(-1,1,1+1/n)+\ln(2), $$ if $\operatorname{Re}[(-1)^{1/n}]\ge 1$ or $\operatorname{Re}[(-1)^{1/n}]\le 0$ or $(-1)^{1/n}\not\in\mathbb{R}.$ Also, $n>0.$ Here $\Phi$ is the Hurwitz-Lerch transcendent function. $\endgroup$ – Adrian Keister Sep 3 at 18:56
  • 1
    $\begingroup$ I would bet that there should have been a limit in front of that integral. $\endgroup$ – LeBlanc Sep 3 at 19:05
  • 2
    $\begingroup$ @Florin1335 thanks for the photo! Well, I still believe there's just a typo and the teacher forgot to add the limit. There is no way one would ever mark this integral the same points as for proving that $\ln(1+x)\le x$. In particular I think that inequality was given in order to show (followed by squeezing the limit): $$\int_0^1 \ln(1+x^n)dx\le \int_0^1 x^n dx=\frac{1}{n+1}$$ $\endgroup$ – LeBlanc Sep 3 at 19:36

Prelude with Harmonic Numbers $$ \begin{align} H(x)&=\sum_{k=1}^\infty\left(\frac1k-\frac1{k+x}\right)\tag1\\ \frac12H\!\left(\frac x2\right)&=\sum_{k=1}^\infty\left(\frac1{2k}-\frac1{2k+x}\right)\tag2\\ H(x)-H\!\left(\frac x2\right)&=\sum_{k=1}^\infty(-1)^{k-1}\left(\frac1k-\frac1{k+x}\right)\tag3 \end{align} $$ Explanation:
$(1)$: extension of the Harmonic Numbers to $\mathbb{C}$
$(2)$: compute the series for even indices
$(3)$: compute the alternating series

The Harmonic numbers are related to the Digamma function by $H(x)=\gamma+\psi(1+x)$, where $\gamma$ is the Euler-Mascheroni constant.

The Integral $$ \begin{align} \int_0^1\log\left(1+x^n\right)\,\mathrm{d}x &=\sum_{k=1}^\infty\int_0^1\frac{(-1)^{k-1}x^{nk}}k\,\mathrm{d}x\tag4\\ &=\sum_{k=1}^\infty\frac{(-1)^{k-1}}{k(nk+1)}\tag5\\ &=\sum_{k=1}^\infty(-1)^{k-1}\left(\frac1k-\frac1{k+1/n}\right)\tag6\\[3pt] &=H\!\left(\frac1n\right)-H\!\left(\frac1{2n}\right)\tag7\\[6pt] &=\psi\!\left(1+\frac1n\right)-\psi\!\left(1+\frac1{2n}\right)\tag8 \end{align} $$ Explanation:
$(4)$: apply the Taylor series for $\log(1+x)$
$(5)$: evaluate the integrals
$(6)$: partial fractions
$(7)$: apply $(3)$
$(8)$: give $(7)$ in terms of the Digamma function

Note that using $(7)$ from this answer, we can compute $(7)$ as a finite sum in terms of logs, sines, and cosines.


Integrating by parts as suggested by mathworker21 gives

\begin{align}\int\ln(1+x^n)~\mathrm dx&=x\ln(1+x^n)-n\int\frac{x^n}{1+x^n}~\mathrm dx\\&=x\ln(1+x^n)-n\int\frac{1+x^n-1}{1+x^n}~\mathrm dx\\&=x\ln(1+x^n)-nx+\int\frac n{1+x^n}~\mathrm dx\end{align}

where the last bit is given in this answer as a combination of logarithms and arctangents, provided $n\in\mathbb Z$. In a similar manner, rational $n$ can be handled as well. In the case of irrational $n$, one requires special functions, such as the digamma function.


Not the answer you're looking for? Browse other questions tagged or ask your own question.