- #1
physics604
- 92
- 2
1. $$\int \frac{1}{1+e^x}\,dx$$
Substitution
$$u=1+e^x$$ $$du=e^xdx$$
$$\int \frac{1}{u}\frac{1}{e^x}\,du$$ $$\int \frac{1}{u}\frac{1}{u-1}\,du$$ $$\int \frac{1}{u(u-1)}\,du$$
$$= \ln {|u^2-u|} = \ln {|(1+e^x)-(1+e^x)|} = \ln {|1+2e^x+e^{2x}-1-e^x|} = \ln {|e^2|}$$
There is something obviously wrong with my answer but I don't know what. The answer key says $$x-\ln {(1+e^x)}+C$$ Any help is greatly appreciated!
Homework Equations
Substitution
The Attempt at a Solution
$$u=1+e^x$$ $$du=e^xdx$$
$$\int \frac{1}{u}\frac{1}{e^x}\,du$$ $$\int \frac{1}{u}\frac{1}{u-1}\,du$$ $$\int \frac{1}{u(u-1)}\,du$$
$$= \ln {|u^2-u|} = \ln {|(1+e^x)-(1+e^x)|} = \ln {|1+2e^x+e^{2x}-1-e^x|} = \ln {|e^2|}$$
There is something obviously wrong with my answer but I don't know what. The answer key says $$x-\ln {(1+e^x)}+C$$ Any help is greatly appreciated!