Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Here is my work, with the right answer. I feel like every step is right, but somehow I am getting the wrong answer. How?

$$ \int \frac{1}{1+e^z}dz = \int\frac{1}{e^z(\frac{1}{e^z} + 1)}dz =\int\frac{1}{\frac{1}{e^z} + 1}\frac{1}{e^z}dz $$ subbing $u = \frac{1}{e^z} + 1$, $\frac{du}{dz} = -e^{-z}dz \implies -du = \frac{1}{e^z}dz$ so

$$\int \frac{1}{1+e^z}dz = -\int\frac{1}{u}du = -\ln(u) + C = -\ln(e^{-z}+1) + C$$

But the right answer is $z - \ln(1+e^z)+C$

share|cite|improve this question

2 Answers 2

Your answer is correct. $$ -\ln \left( e^{-z}+1\right) + C = -\ln \left[ e^{-z} \left( 1 + e^z\right)\right] + C = \dots $$

share|cite|improve this answer

The "right answer" is merely the simplification of the answer you found.

$$ z+\text{ln}\left(1+e^{-z}\right)==\text{ln}\left(1+e^z\right)\\ e^{z+\text{ln}\left(1+e^{-z}\right)}==e^{\text{ln}\left(1+e^z\right)}\\ e^z\left(1+e^{-z}\right)==1+e^z\\ e^z+1==1+e^z $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.