Hard limit to solve involving exponential and square root How to find this limit:
$$\lim_{x \to 0}\frac{a(1-e^{-x})+b(e^x-1)}{\sqrt{a(e^{-x}+x-1)+b(e^x-x-1)}}.$$
Where $a$ and $b$ are integer constants. I've tried substitution, L'Hôpital's rule, rationalizing the denominator and all the techniques I knew about limits, but I can't find the answer.  
 A: You can try with
$$
\lim_{x \to 0}\frac{(a(1-e^{-x})+b(e^x-1))^2}{a(e^{-x}+x-1)+b(e^x-x-1)}
$$
If you try l’Hôpital, you get
$$
\lim_{x\to0}\frac{
  2(a(1-e^{-x})+b(e^x-1))(ae^{-x}+be^x)
}{
  -ae^{-x}+a+be^{x}-b
}\tag{*}
$$
If you assume $a+b\ne0$, then you can remove the factor $2(ae^{-x}+be^x)$ from the numerator (you can reinsert $2(a+b)$ at the end) and apply l'Hôpital again
$$
\lim_{x\to0}\frac{ae^{-x}+be^x}{ae^{-x}+be^x}=1
$$
Then the limit (*) is $2(a+b)$ (which should be positive) and your limit is
$$
\sqrt{2(a+b)}
$$
You can check that with $b=-a\ne0$, the limit is $0$.
A: (assuming limit from the right). Use Taylor Series: $$e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\ldots\implies e^{-x}=1-x+\frac{x^2}{2!}-\frac{x^3}{3!}+\ldots$$
so that $$\lim_{x \to 0}\frac{a(1-e^{-x})+b(e^x-1)}{\sqrt{a(e^{-x}+x-1)+b(e^x-x-1)}}$$ $$=\lim_{x \to 0}\frac{a(x-\frac{x^2}{2}+\ldots)+b(x+\frac{x^2}{2}+\ldots)}{\sqrt{a(\frac{x^2}{2}-\frac{x^3}{3!}+\ldots)+b(\frac{x^2}{2}+\frac{x^3}{3!})}}\cdot\dfrac{\frac{1}{x}}{\frac{1}{x}}$$ $$= \lim_{x \to 0}\frac{a(1-\frac{x}{2}+\ldots)+b(1+\frac{x}{2}+\ldots)}{\sqrt{a(\frac{1}{2}-\frac{x}{3!}+\ldots)+b(\frac{1}{2}+\frac{x}{3!})}}=\dfrac{a+b}{\sqrt{\frac{1}{2}(a+b)}}=\boxed{\sqrt{2(a+b)}}$$
If it's the limit from the right, it's just the negative of this. Note that we used that $\frac{1}{x}=\frac{1}{\sqrt{x^2}}$ (principle).
Alternatively, we could have used L'Hopital just fine: $$I=\lim_{x \to 0}\frac{a(1-e^{-x})+b(e^x-1)}{\sqrt{a(e^{-x}+x-1)+b(e^x-x-1)}}$$
$$= \lim_{x \to 0}\frac{ae^{-x}+be^x}{\frac{1}{2}\left(a(e^{-x}+x-1)+b(e^x-x-1)\right)^{-\frac{1}{2}}\cdot \left(a(-e^{-x}+1)+b(e^x-1)\right)}=2(a+b)\lim_{n\to0}\frac{\sqrt{a(e^{-x}+x-1)+b(e^x-x-1)}}{a(1-e^{-x})+b(e^x-1)}=2(a+b)\frac{1}{I}\implies I^2=2(a+b)\implies \boxed{I=\sqrt{2(a+b)}}$$
A: Use the second-order approximation $e^x = 1 + x +x^2/2$ to get
$$\lim_{x \to 0}\frac{a(1-e^{-x})+b(e^x-1)}{\sqrt{a(e^{-x}+x-1)+b(e^x-x-1)}} = \\ \lim_{x \to 0}\frac{a(x- x^2/2)+b(x +x^2/2)}{\sqrt{a(x^2/2)+b(x^2/2)}} = \\ \lim_{x \to 0} \frac{a(1- x/2)+b(1 +x/2)}{\sqrt{a(1/2)+b(1/2)}}=\sqrt{2(a+b)}$$
