# Show that a non-linear equation has exactly two roots

How can I show, that the following equation $xe^{-x} = e^{-3}$ has exactly two roots?

I found here an answer, but it uses many other theorems as well, and we have not yet studied so advanced concepts. We studied only Rolles theorem.

Any help would be great, as I am stucked in this question for two days.

• Write as $x=e^{x-3}$. Not that the right hand side has an always positive second derivative, and a first derivative both less than and greater than 1. – dbx Jun 3 '18 at 4:37

Consider the function $f(x) = xe^{-x} - e^{-3}$. The roots are the solutions to the equation $xe^{-x} - e^{-3} = 0$. Now, $f'(x) = e^{-x}(1-x)$. So, the derivative is zero only at $x = 1$. Moreover, $f(1)>0$ and $f'(x)<0$ for $x>1$, which means that we have at most one root to the right of $1$. Likewise, for $x<1$, $f'(x)>0$, which means that we have at most one root to the left of $x=1$. We must also show that there is some $x>1$ such that $f(x)<0$. Take, for example, $x=6$. Also, we must show that for some $x<1$, $f(x)<0$. Take for example $x=0$. The Intermediate Value Theorem closes the deal. Two roots total.