# Show that the equation $\log(1+e^x)=\cos(x)$ has infinitely many negative solutions.

Show that the equation $$\log(1+e^x)=\cos(x)$$ has infinitely many negative solutions. Find out if there is a positive solution and if it is unique.

From the graph I can see that it has an infinitely many negative solutions and that it has one positive solution. I don't know how to prove it rigorously. Could you help me? Thank you for your time.

The fact is more general: given any function $f:(-\infty,0]\to[0,1)$, the equation $f(x)=\cos x$ has infinitely many solutions. Hint for a proof: consider the intermediate value theorem applied to the function $f(x)-\cos x$, in particular e.g. at the values where $\cos$ attains its max or min.

If anon's answer seems a little abstract to you, you can argue through inequalities that

for $\ x < 0 \ ,$

$$\ 0 \ < \ e^x \ < \ 1 \ \Rightarrow \ 1 \ < \ 1 + e^x \ < \ 2 \$$

$$\Rightarrow \ \ln \ 1 \ = \ 0 \ < \ \ln (1 + e^x) \ < \ \ln 2 \ < 1 \ .$$

So $\ \ln (1 + e^x) \$ lies entirely within the bounds of the cosine function (and in fact is always positive), and thus for negative values of $\ x \$ , there will be two solutions of $\ \ln (1 + e^x) \ = \ \cos x \$ for every "cycle" of the cosine function on $\ ( -\infty \ , \ 0 ) \ .$

The existence of a positive solution is found through the Intermediate Value Theorem, as anon has indicated. To see that it is unique, consider the derivative of the function $\ \ln (1 + e^x) - \cos x \$ for $\ x > 0 \$ to show that the function is monotonically increasing.