5

Evaluate the following indefinite integral. $$\int\ln(1 + e^x) \mathrm dx$$ My attempt :: Using integration by-parts,

\begin{align} \int\ln(1 + e^x)\cdot 1\ \mathrm dx &= x\ln(1 + e^x) - \int \frac{x\cdot e^x\ \mathrm dx}{1 + e^x}\\ &= x\ln(1+e^x) - \frac{x^2\cdot e^x}{2(1+e^x)} + \int \frac{x^2\cdot e^x\ \mathrm dx}{2(1 + e^x)^2}\\ &= x\ln(1 + e^x) - \frac{x^2\cdot e^x}{2(1 + e^x)} + \frac{x^3\cdot e^x\ \mathrm dx}{6(1 + e^x)^2} - \int \frac{x^3 \cdot e^x(e^x-1)\ \mathrm dx}{6 (1+ e^x) ^3}\\ &= x\ln(1 + e^x) - \frac{x^2\cdot e^x}{2(1 + e^x)} + \frac{x^3\cdot e^x\ \mathrm dx}{6(1 + e^x)^2} - \frac{x^4\cdot e^x(e^x - 1)}{24(1 + e^x)^3}\\ &+ \int \frac{x^4 \cdot e^x(e^{2x} + e^x+1)\ \mathrm dx}{24 (1+ e^x) ^3}\\ &= \lim_{N \to \infty} \sum_{n=1}^N\left( \frac{x^n}{n!}\frac{\mathrm d^n}{\mathrm dx^n}\Big(\ln(1 + e^x)\Big)\right) \end{align}

Obviously, this is a dead end (applicable for all n-differentiable functions) and I'm just not capable of finding the actual answer. Please educate me on how to properly do this integral.

Aditya Hase
  • 8,851
Nick
  • 6,804

1 Answers1

7

Let $$\mathcal{ I}=\int \ln(1 + e^x)\ \mathrm dx$$

By substituting $e^x=-t\iff e^x\,\mathrm dx=\dfrac{\mathrm dt}{t}$

$$\begin{align} \mathcal{ I} &=\int \frac{\ln(1 -t)}{t}\ \mathrm dt =-\int \frac{1}{t}\sum_{n=1}^{\infty}\frac{t^n}{n}\ \mathrm dt =-\int \sum_{n=1}^{\infty}\frac{t^{n-1}}{n}\ \mathrm dt\\ &=-\sum_{n=1}^{\infty}\int \frac{t^{n-1}}{n}\ \mathrm dt =-\sum_{n=1}^{\infty}\frac{t^{n}}{n^2} =-\text{Li}_2\left(t\right) =-\text{Li}_2\left(-e^x\right)\\ \end{align}$$


$\text{Explanations}$

$$\ln(1-t)=-\sum_{n=1}^{\infty}\frac{t^n}{n}$$

$$ \operatorname{Li}_s(z) = \sum_{k=1}^\infty {z^k \over k^s} = z + {z^2 \over 2^s} + {z^3 \over 3^s} + \cdots \ $$

Aditya Hase
  • 8,851
  • @Nick You can get $\text{Li}_2(t)$ by taylor expanding the numerator and integrating termwise. – Aditya Hase Dec 21 '14 at 17:54
  • Thanks, I was aware of the expansion, just not the fact that $$\text{Li}_2(z) = - \int \frac{\ln(1-z)}{z}\mathrm dt$$ Where did you get that from and how would you generally define $Li_n(z)$ ? – Nick Dec 21 '14 at 17:58
  • @Nick I've edited my answer! – Aditya Hase Dec 21 '14 at 18:02
  • I've learnt a lot from this post; the polylogarithm, interchanging sum and integral, the taylor series for $\ln\left(\frac{1}{1 - x}\right)$ is $\displaystyle \sum_{n=1}^{\infty}\frac{x^n}{n}$ ... btw, how do you remember that series from the top of your head? – Nick Dec 21 '14 at 18:24
  • @Nick, integration. Take the geometric series:

    $\sum_{n=1}^{\infty} x^{n-1} = \frac{1}{1-x}$ Then integrate.

    – Amad27 Dec 22 '14 at 09:40