Solving $xe^{-x}+2e^{-x}=0$

While I was studying my maths book, I came across this equation:

$$xe^{-x}+2e^{-x}=0$$

I tried to solve it in different ways, but each time I break up some rule. My best try was this:

Let's $u=e^{-x}$, thus we have: $$xu+2u=0$$ By taking $u$ as a common factor we get:

$$u(x+2)=0$$

By dividing both side by $(x+2)$ we get:

$$u=0$$

But $u=e^{-x}$, then:

$$e^{-x}=0 \\ ln(e^{-x}) = ln(0) ??$$

$ln(0)$ is obviously wrong, where did I slip?

-

When you divide by $x+2$ how do you know $x+2\neq 0$? Indeed you don't! Thats why you should get $u=0$ or $x+2=0$. The first equation has no solutions as $u=e^{-x}>0$. The second gives $x=-2$.

You write $e^{-x}=0$. This equation has no solutions. But you can't write $\ln (e^{-x})=\ln (0)$!!!! This is because $\ln (0)$ is not defined!

-
@Sp. Note that as above never,never make some exponential terms like $e^a$ equal to $0$. It is absolutely wrong. No additional notes needed for your problem +1 :-) –  Babak S. Dec 30 '12 at 9:46
$\ln(0!!!!)$ is defined; it's zero. :-) –  Henning Makholm Dec 30 '12 at 10:45
@HenningMakholm I believe you know I meant $\ln(0)$ and not $\ln(0!!!)$! –  Nameless Dec 30 '12 at 10:48

If $xe^{-x}+2e^{-x}=0$, then divide across by $e^{-x}$ (which is non-zero) to get $x+2=0$, which has the solution $x=-2$.

-

$a\cdot b=0\implies a=0\text{ or }b=0$ so $u=0\text{ or }x+2=0$.

You deduced $u\neq0$ hence $x+2=0$. That is $x=-2$

-