solving limit from 2nd bernoulli number I'm having trouble solving the following limit:
$$
\lim_{x \to 0}\frac{xe^{2x}+xe^{x}-2e^{2x}+2e^{x}}{(e^{x}-1)^{3}}  
$$
substitution gives a 0/0 indeterminate, and we can get around it with de l'hopital rule, but i've tried to simplify the expression in order to solve the limit without it:
$$
\lim_{x \to 0}{\frac{x}{e^{x}-1}} \times \lim_{x \to 0}{\frac{e^{2x}+e^{x}}{(e^{x}-1)^2}}+2\lim_{x \to 0}{\frac{e^{x}-e^{2x}}{(e^{x}-1)^3}} 
$$
$$
=\lim_{x \to 0}{e^{x}}\times \lim_{x \to 0}{\frac{e^{x}+1}{(e^{x}-1)^2}}+2\lim_{x \to 0}{e^{x}}\times \lim_{x \to 0}{\frac{1-e^{x}}{(e^{x}-1)^3}}
$$
$$
=\lim_{x \to 0}{\frac{e^{x}+1}{(e^{x}-1)^2}}-2\lim_{x \to 0}{\frac{e^{x}-1}{(e^{x}-1)^3}}
$$
$$
=\lim_{x \to 0}{\frac{e^{x}+1}{(e^{x}-1)^2}}-2\lim_{x \to 0}{\frac{1}{(e^{x}-1)^2}}
$$
$$
=\lim_{x \to 0}{\frac{e^{x}+1-2}{(e^{x}-1)^2}}=\lim_{x \to 0}{\frac{1}{e^{x}-1}}
$$
I obviously did something wrong in the middle, as the limit I arrive at doesn't exist, but the initial limit does exist and is 1/6 (from de l'hopital rule). Can someone point out the error(s)? thank you for the help
 A: What you did is 
$$\begin{align}\frac{xe^{2x}+xe^x-2e^{2x}+2e^x}{(e^x-1)^3}&=\frac{xe^{2x}+xe^x}{(e^x-1)^3}+\frac{-2e^{2x}+2e^x}{(e^x-1)^3}\\&=\frac{x}{e^x-1}\cdot\color{red}{\frac{e^{2x}+e^x}{(e^x-1)^2}}+2\color{blue}{\cdot\frac{e^x-e^{2x}}{(e^x-1)^3}}\end{align}$$
And you took each limit separately. 
You cannot separate it in that way because 
$$\lim_{x\to 0}\color{red}{\frac{e^{2x}+e^x}{(e^x-1)^2}}=+\infty,\ \ \ \lim_{x\to 0}\color{blue}{\frac{e^x-e^{2x}}{(e^x-1)^3}}=-\infty.$$
(note that you have $1\cdot \infty+2\cdot(-\infty)$. You could do that if these limits were finite)
Instead, you can use l'Hospital directly as Timbuc does.
A: Differentiating with l'Hospital:
$$\lim_{x\to 0}\frac{xe^{2x}+xe^x-2e^{2x}+2e^x}{(e^x-1)^3}\stackrel{l\,'H}=\lim_{x\to 0}\frac{-3e^{2x}+2xe^{2x}+3e^x+xe^x}{3e^x(e^x-1)^2}=$$
$$=\lim_{x\to 0}\frac{-3e^x+2xe^x+3+x}{3(e^x-1)^2}\stackrel{l\,'H}=\lim_{x\to 0}\frac{-e^x+2xe^x+1}{6e^x(e^x-1)}\stackrel{l\,'H}=$$
$$=\lim_{x\to 0}\frac{e^x+2xe^x}{6(e^x-1)+6e^{2x}}=\frac16$$
A: Around zero,
$e^x
\approx 1+x+x^2/2+x^3/6+O(x^4)
\approx 1+x+O(x^2)
\approx 1+O(x)
$,
so
$\begin{array}\\
\frac{xe^{2x}+xe^{x}-2e^{2x}+2e^{x}}{(e^{x}-1)^{3}}
&=\frac{(x-2)e^{2x}+(x+2)e^{x}}{(e^{x}-1)^{3}}\\
&\approx \frac{(x-2)(1+2x+2x^2+4x^3/3+O(x^4))
+(x+2)(1+x+x^2/2+x^3/6+O(x^4))}
{(x+O(x^2))^{3}}\\
&=\frac{(1/6) x^3 (9 x+1)+O(x^4)}{x^3(1+O(x))^{3}}
\quad\text{(I used Wolfy here)}\\
&=\frac{1/6 +3x/2+O(x)}{(1+O(x))^{3}}\\
&=\frac{1/6  +O(x)}{1+O(x)}\\
&= \frac16 + O(x)\\
\end{array}
$
so the limit is $\frac16$.
A: Your first equality
$$\lim_{x \to 0}\frac{xe^{2x}+xe^{x}-2e^{2x}+2e^{x}}{(e^{x}-1)^{3}}=\lim_{x \to 0}{\frac{x}{e^{x}-1}} \times \lim_{x \to 0}{\frac{e^{2x}+e^{x}}{(e^{x}-1)^2}}+2\lim_{x \to 0}{\frac{e^{x}-e^{2x}}{(e^{x}-1)^3}}$$
is not true. The reason is that the '+' sign in the RHS adds two infinite quantities, one $+\infty$ and the second is $-\infty$ .
To wrote $$\lim_{x \to 0}(f(x)+g(x))=\lim_{x \to 0}f(x)+\lim_{x \to 0}g(x)$$ one should first be sure that the two limits in the RHS are finite, or one of them infinite only, or both are infinite of the same sign. But not both infinite one with + and the other with - signs. In your example, it is precisely this forbidden case which holds!
