# Why $x-\ln (1+e^x)=c$ has a solution for every $c<0$ and not otherwise?

The equation $x-\ln (1+e^x)=c$ has a solution for every $c<0.$

Why is that restriction needed? Why are not we allowed to take positive $c$? I can see that $c=0$ is impossible as $x=\ln (1+e^x)$ means $e^x=1+e^x$ or $'0=1'.$

-

$$x=\ln(1+e^x)+c$$ $$\iff e^x=(1+e^x)e^c$$ $$\iff e^x=\frac{e^c}{1-e^c}=\frac1{1-e^c}-1$$

Now, $c<0\implies 0<e^c<1\implies 0<1-e^c<1\implies \frac1{1-e^c}>1$ Since the equation $e^x=k$ is solvable iff $k>0$, we are done.

-
Thank you so much! So beautiful solution, Sir! –  Sush Apr 11 at 3:22

Well, $\ln\left(e^x\right) = x$, by definition. Since the function $\ln(x)$ is strictly increasing, it follows that $\ln(e^x + 1) > x$.Thus, $x - \ln(1+e^x) < 0$.

EDIT: In fact, we can solve there is a solution to the equation

$$x - \ln(1+e^x) = c$$

for every $c < 0$. To see why, consider an arbitrary $c < 0$. Then, $0 < e^c < 1$. Taking the exponential of the left hand side, we obtain

$$e^{x - \ln(1+e^x)} = \frac{e^x}{1+e^x} = 1 - \frac{1}{1+e^x}.$$ Now, the range of $f(x) = 1 + e^x$ is $(1, \infty)$, so the range of $g(x) = 1 - \frac{1}{1+e^x}$ will be $(0, 1)$. Thus, there exists a solution to the equation $1 - \frac{1}{1+e^x} = e^c$ for every $c < 0$. But, since the exponential function is one-to-one, any $x$ which solves this equation will also solve

$$x - \ln(1+e^x) = c.$$

-
You have shown that it is $<0$. But, does it touch every number $\in <-\infty,0>$(a solution exists)? –  chubakueno Apr 11 at 2:58
@chubakueno, in fact, yes! See my edit. –  Strants Apr 11 at 3:14
Cool!+1, it is a complete answer now :) –  chubakueno Apr 11 at 3:24

Because as $x \rightarrow \infty$, we have $f(x)=x-ln(1+e^x) \rightarrow 0^-$, meaning that the x axis is a horizontal asymptote. By differentiating and observing the derivative, you can see that the function is monotonic increasing, meaning that the 'highest' that the curve ever gets is infinitely close to the x axis.

So if you draw $y=c$, where $c>0$, it will NOT intersect the function, which is why $x-ln(e^x+1)=c$ has no solutions. However, when $c<0$, there will be solutions because $y=c$ would then be below the x axis, where it will intersect the function.

-