4

I was given the integral $$\int \frac{2}{e^{-x}+1}dx$$ Here is my method to get the (correct) solution: $$\int \frac{2}{e^{-x}+1}dx$$ $$=2\int \frac{1}{e^{-x}+1}dx$$ $$=2\int \frac{e^xe^{-x}}{e^{-x}+e^xe^{-x}}dx$$ $$=2\int\frac{e^x}{1+e^x}dx$$ Let $u=e^x+1$ and $du=e^xdx$

So it becomes $$2\int\frac{1}{u}du$$ $$=2 \ln|u|+c$$ $$=2 \ln(e^x+1)+c$$ Is there an alternative way to do this? My first thought was, when I got to $$=2\int\frac{e^x}{1+e^x}dx$$ to write it as $$=2\int\frac{e^x+1-1}{1+e^x}dx$$ as one would do for $$=2\int\frac{x+1-1}{1+x}dx$$ but it becomes instead $$2\int1-\frac{1}{1+e^x}dx$$ where it doesn't seem $u$-substitution would work.

HDE 226868
  • 2,354

1 Answers1

2

You can also use the Bioche rules:

Take $t = \tanh x/2$:

$$ dt = \frac {dx}{2\cosh^2x/2} \\ \int \frac{e^x dx}{1 + e^x} = \int \frac{e^{x/2} dx}{e^{-x/2} + e^{x/2}} = \int \frac{e^{x/2} dx}{2\cosh x/2} = \frac12 \int \frac{1 + e^{x} dx}{2\cosh^2 x/2} $$

Then use the expression of $\tanh^{-1}$: $$ \tanh^{-1}(t) = \frac 12\log\frac{1+t}{1-t} \\ \implies e^{x} = \frac{1+t}{1-t} \\ %%%%% \int \frac{e^x dx}{1 + e^x} = \frac12 \int \left(1 + \frac{1+t}{1-t} \right)dt = \int \frac{dt}{1-t} = -\log(1-t) \\= -\log(1 - \tanh x/2) = -\log \frac 2{1 + e^{2x}} = \log \frac {1 + e^{2x}}2 = \log (1 + e^x) + const. $$

mookid
  • 28,236