3

I am trying to solve this integral:

$\int_{0}^{1}e^{x}\ln(1+e^{x})dx$

Here is my attempt:
$[e^{x}\ln(1+e^{x})]_{0}^{1} - \int e^{x} \frac{e^{x}}{1+e^{x}}dx$

$[e^{x}\ln(1+e^{x})]_{0}^{1} - \int e^{x} \frac{e^{x}}{1+e^{x}}dx$

$[e^{x}\ln(1+e^{x})]_{0}^{1} - ( \ln(1+e^{x})e^{x} - \int \ln(1+e^{x})e^{x}dx )$

Then I got the original integral back, my attempt was to then use this method:

$I = \int_{0}^{1}e^{x}\ln(1+e^{x})dx$

$I = [e^{x}\ln(1+e^{x})]_{0}^{1} - \ln(1+e^{x})e^{x} + I$

$0 = [e^{x}\ln(1+e^{x})]_{0}^{1} - \ln(1+e^{x})e^{x}$

And now I don't know what to do because the $I$ on the left and right cancel each other. Any help is greatly appreciated.

Firellsp
  • 117

1 Answers1

5

Consider the substitution $$u= 1+e^x.$$

In this case, you have $dx = e^{-x} du$, $u=2$ as $x\to 0$, $u\to 1+e$ as $x\to 1$ and you integral turns into $$ \int_2^{1+e} \log(u) du,$$

which can be easily solved using integration by parts. To be more clear, integration by parts is: $$\int_2^{1+e} f(u) g^{\prime}(u)\ du = f(u) g(u)\Big|_{2}^{1+e}-\int_2^{1+e} f^{\prime}(u) g(u) du.$$ Here you can take $f(u) = \log(u)$ and $g^{\prime}(u) =1.$

Then it follows that $$ \int_2^{1+e} \log(u) du = u \log(u)\big|_2^{1+e} -\int_2^{1+e} 1 du =(u \log(u) - u)\Big|_2^{1+e}.$$

Going back with the substitution you have $$\int_0^1 e^x \log(1+e^x) dx = \left[(1+e^x) \log(1+e^x) - 1-e^x)\right]\Big|_0^1 \\= (e+1)\log(e+1)-2\log(2) -e+1.$$

$\bf{EDIT:}$ I changed the extremals of the integral, but actually in the end I preferred to switch to the original integral to substitute the extremals.

Gary
  • 31,845
C. Bishop
  • 3,418