Prove $xe^x =2$ for some $x \in (0,1)$ 
We are trying to prove $xe^x =2$ for some $x \in (0,1)$. 

I know for certain that if this question were asking to prove the equality for some $x$ in the closed interval $[0,1]$ then I could apply the intermediate value theorem:


*

*Let $f(x) = xe^x$ implying:


$f(0) = 0 \lt 2$ and $f(1) = 1\cdot e^1=e \gt 2$ and by the intermediate value theorem there must exist some $x \in [0,1]$ such that $f(x)=2$.


*

*My question is if we can use the Intermediate Value Theorem in my original question - where we have $x \in (0,1)$ the open interval.


I know the discrepancy arises since the interval is open and there is no explicit definition of the function at the end-points $0$ and $1$.
Thank you guys!
 A: I post this answer in order to clarify a discusion that arose on Avid's answer.

Suppose we have the function $f(x)=\frac{1}{x}$ defined on $(0,1)$ and
  we want to prove that $f(z)=2$ for some $z\in (0,1]$ using the Intermediate 
  Value Theorem (of course, it would be easier to say $z=\frac{1}{2}$,
  but that's not the idea here).
Well, we argue as follows:
Consider the function restricted to $[\frac{1}{4},1]$, since
  $f(1)=1<2<4=f(1/4)$, by IVT there is some $z\in [\frac{1}{4},1]\subseteq (0,1]$ such
  that $f(z)=2$.
(Note all of this argument requires continuity of $f$).

A: If $f(x)=2$ some point in the interval $[0,1]$, and we know for a fact that it's not $0$ or $1$, we know that $f(x)=2$ in the interval $(0,1)$.
A: We can show this directly by using The Lambert W function, which is defined as $f(W)=We^{W}$.   
Thus, $xe^x=2 \implies x=W(2)\approx. 0.85260550201372549134647241$.
Thus, we have $xe^x=2$ for $0<x\approx. 0.85260550201372549134647241<1$.
A: we have $f(0)=0$ and $f(1)=e>2$ then the function must have a root between $0$ and $1$.
