Computing $\lim_{x\rightarrow 0}{\frac{xe^x- e^x + 1}{x(e^x-1)}}$ without L'Hôpital's rule or Taylor series

Having $$\lim\limits_{x\rightarrow 0}{\frac{xe^x- e^x + 1}{x(e^x-1)}}= 1+\lim\limits_{x\rightarrow 0}{\frac{x- e^x + 1}{x(e^x-1)}}= 1+\lim\limits_{x\rightarrow 0}{\frac{x- e^x + 1}{x^2\frac{e^x-1}{x}}}= 1-\lim\limits_{x\rightarrow 0}{\frac{e^x-1 - x}{x^2}}$$ It's only left to compute $\lim\limits_{x\rightarrow 0}{\frac{e^x-1 - x}{x^2}}$, which is not that trivial seing the answers to that question.


Replacing $ x $ by $\color{red}{ -x} $,

$$L=\lim_0\frac{xe^x-e^x+1}{x(e^x-1)}$$ $$=\lim_0\frac{-xe^{\color{red}{-x}}-e^{-x}+1}{-x(e^{-x}-1)}$$

$$=\lim_0\frac{-x-1+e^x}{x(e^x-1)}$$

the sum gives $$2L=\lim_0\frac{x(e^x-1)}{x(e^x-1)}=1$$ thus $$L=\frac 12$$


How about using the Cauchy's mean value theorem (L'Hospital rule can be seen as a specialization of this). Let $f(x)=xe^x-e^x+1$ and $g(x)=xe^x-x$, then $f(0)=0=g(0)$ and by the (generalize) mean value theorem, there is $c_x$ between $0$ and $x$ such that $$f'(c_x)(g(x)-g(0))=g'(c_x)(f(x)-f(0)).$$ This can be expressed as

$$ \frac{f(x)}{g(x)}=\frac{f(x)-f(0)}{g(x)-g(0)}=\frac{f'(c_x)}{g'(c_x)}=\frac{c_xe^{c_x}}{c_xe^{c_x}+ e^{c_x}-1}=\frac{e^{c_x}}{e^{c_x}+\frac{e^{c_x}-1}{c_x}}$$

As $x\rightarrow 0$, $c_x\rightarrow 0$ and so

$$\lim_{x\rightarrow0}\frac{f(x)}{g(x)}=\lim_{x\rightarrow0}\frac{e^{c_x}}{e^{c_x}+\frac{e^{c_x}-1}{c_x}}=\frac{1}{2}$$

Here we have use the fact that $\lim_{h\rightarrow0}\frac{e^h-1}{h}=\exp'(0)=1$.