# How to evaluate the following integral? $\int \ln(e^x + c)~\mathrm dx$

I can't seem to find an answer for this kind of integration, and I'd like to know if there is an answer for it, and if yes what is it.

$$\int \ln(e^x + {c})~\mathrm dx\,,$$ where $c$ is a constant. My teacher keeps avoiding me after I asked him, so I appreciate any help because I've tried everything I know.

• A WolframAlpha search gives me this: wolframalpha.com/input/?i=int%28ln%28exp%28x%29%2Bc%29%2Cx%29 . I don't know what $\text{Li}_2$ is supposed to be. – Clarinetist Jun 19 '14 at 15:29
• @Clarinetist $\text{Li}_2(\cdot)$ is dilog function. – Tunk-Fey Jun 19 '14 at 15:32
• When faced with $\int f(e^x)\,\mathrm{d}x$, try transform it into $\int u^{-1}f(u)\,\mathrm{d}u$. – ziyuang Jun 19 '14 at 16:50
• @Clarinetist Well, I've already checked wolframalpha.com of course, and the same reaction I don't know what is Li2. – rand Jun 20 '14 at 7:03
• @ziyuang in fact I did try this, but I didn't know the dilog function so it was a block wall for me. – rand Jun 20 '14 at 7:04

I'm assuming $c >0$.

Let $u =e^{x}$.

Then $du = e^{x} \ dx = u \ dx$.

And

\begin{align} \int \log(e^{x} + c) \ dx &= \int \frac{\log(u+c)}{u} du \\ &= \int \frac{\log(c(1+\frac{u}{c}))}{u} \ du \\ &= \log (c) \int \frac{1}{u} \ du + \int \frac{\log(1+\frac{u}{c})}{u} du \\ &=\log(c) \log (u) - \text{Li}_{2} \left(-\frac{u}{c} \right) + C \\ &= \log(c) \log(e^{x}) - \text{Li}_{2} \left(-\frac{e^{x}}{c} \right) + C \\ &= x \log(c) - \text{Li}_{2} \left(-\frac{e^{x}}{c} \right) + C \end{align}

where $\text{Li}_{2}(x)$ is the dilogarithm function.

EDIT:

Similar to what I did above,

$$\int \ln(e^{x}-c) \ dx = x\log(c) + \int \frac{\log(\frac{u}{c}-1)}{u} \ du$$

Let $\displaystyle v= \frac{u}{c}$.

$$= x \log(c) + \int \frac{\log (v-1)}{v} \ dv$$

Let $w = v-1$.

\begin{align} &= x \log (c) + \int \frac{\log w}{1+w} \ dw \\ &= x \log(c) + \log(w) \log(1+w) - \int \frac{\log(1+w)}{w} \ dw \\ &= x \log(c) + \log(w) \log(1+w) + \text{Li}_{2}(-w) + C \\ &= x \log(c) + \log \left(\frac{e^{x}}{c}-1\right)\log\left(\frac{e^{x}}{c}\right) + \text{Li}_{2} \left( 1-\frac{e^{x}}{c} \right) + C \end{align}

This is not in the form given by Wolfram Alpha.

But using it to evaluate some definite integrals for specific values of $c$, it appears to be correct.

• What about a $c<0$? – Ali Caglayan Jun 19 '14 at 15:46
• @Alizter I added a second evaluation. – Random Variable Jun 19 '14 at 17:17

Another approach is \begin{align} \int\log(e^x+c)\,\mathrm{d}x &=\frac{x^2}{2}+\int\log(1+ce^{-x})\,\mathrm{d}x\\ &=\frac{x^2}{2}+\int\left(ce^{-x}-\frac{c^2}{2}e^{-2x}+\frac{c^3}{3}e^{-3x}-\dots\right)\,\mathrm{d}x\\ &=\frac{x^2}{2}+\left(-ce^{-x}+\frac{c^2}{2^2}e^{-2x}-\frac{c^3}{3^2}e^{-3x}+\dots\right)+C\\ &=\frac{x^2}{2}+\mathrm{Li}_2\left(-ce^{-x}\right)+C \end{align} which should be the same as Random Variable's answer using the Inversion Formula proven in this answer: $$\mathrm{Li}_2(x)=-\frac{\pi^2}{6}-\mathrm{Li}_2(1/x)-\frac12\log(-x)^2$$