# Show that these are equivalent $x-\ln|1+e^x| = -\ln|e^{-x}+1|$

Can anyone help me show that the following equations are equivalent?

$$x-\ln|1+e^x| = -\ln|e^{-x}+1|$$

I'm having a little trouble. It should be an easy solution, where I take one equation, start with it, and show that it can turn into the opposing one. I know it involves the properties of logs, but I am just stuck on it.

I got both the equations when solving for the anti-derivative of $1/(1+e^x)$, and am under the impression they are the same, but I do not understand how. I can show my work for this if it would help, just ask. Thank you.

Little help? Would appreciate any insight.

-

Hint: Try starting with $x=\ln(e^x)$ on the left side, to get $$\ln(e^x)-\ln(1+e^x) = -\ln(e^{-x}+1)$$ How can you use properties of logarithms to manipulate the left side further?

-

$$x-\ln|1+e^x|=-(-x+\ln|1+e^x|)$$ $$=-(\ln e^{-x}+\ln|1+e^x|)=-\ln(e^{-x}\cdot|1+e^x|)$$ $$=-\ln|e^{-x}+1|.$$ Above we used $a=\ln e^a$ and $\ln a+\ln b=\ln ab$.

-

Well, if those at the argument of the logarithms are absolute values, you can get rid of them since both $1+e^x$ and $1+e^{-x}$ are greater than $0$. On the other hand $$-\log(1+e^{-x})=\log\left(\frac{1}{1+e^{-x}}\right)=\log\left(\frac{e^x}{1+e^x}\right)=x-\log(1+e^x).$$

-

Note that $e^{-x}+1$ is always positive, as is $1+e^x$, so the absolute value bars are really irrelevant.

Then just do some algebra and use properties of the logarithm: \begin{align*} -\ln|e^{-x}+1| &= -\ln\left(\frac{1}{e^x} + 1\right)\\ &= -\ln\left(\frac{1+e^x}{e^x}\right)\\ &= \ln\left( \left(\frac{1+e^x}{e^x}\right)^{-1}\right)\\ &= \ln\left(\frac{e^x}{1+e^x}\right)\\ &= \ln(e^x) - \ln(1+e^x)\\ &= x - \ln(1+e^x)\\ &= x - \ln|1+e^x|. \end{align*}

-