# Evaluating $\lim_{x\to0}\left(\frac{1+x2^x}{1+x3^x}\right)^\frac1{x^2}$

Find the following limit

$$\lim_{x\to0}\left(\frac{1+x2^x}{1+x3^x}\right)^\frac1{x^2}$$

I have used natural logarithm to get

$$\exp\lim_{x\to0}\frac1{x^2}\ln\left(\frac{1+x2^x}{1+x3^x}\right)$$

After this, I have tried l'opital's rule but I was unable to get it to a simplified form.

How should I proceed from here? Any here is much appreciated!

Solution Procedure Using Taylor Series and L'Hoptial

Try to understand or prove each of the following steps:

1) $\ln \left( {\frac{{1 + x{2^x}}}{{1 + x{3^x}}}} \right) = \ln \left( {1 + x\frac{{{2^x} - {3^x}}}{{1 + x{3^x}}}} \right)$

2) $\ln (1 + x) = x + o({x^2})$

3) $o\left( {{x^2}{{\left( {{{{2^x} - {3^x}} \over {1 + x{3^x}}}} \right)}^2}} \right) = o\left( {o\left( {{x^2}} \right)} \right) = o({x^2})$

4) $\ln \left( {1 + x{{{2^x} - {3^x}} \over {1 + x{3^x}}}} \right) = x{{{2^x} - {3^x}} \over {1 + x{3^x}}} + o({x^2})$

5) $\mathop {\lim }\limits_{x \to 0} {1 \over {{x^2}}}\ln \left( {1 + x{{{2^x} - {3^x}} \over {1 + x{3^x}}}} \right) = \mathop {\lim }\limits_{x \to 0} \frac{1}{x^2} \times x{{{2^x} - {3^x}} \over {\left( {1 + x{3^x}} \right)}}$

6) $\mathop {\lim }\limits_{x \to 0} {{{2^x} - {3^x}} \over {x\left( {1 + x{3^x}} \right)}} = \mathop {\lim }\limits_{x \to 0} {{{2^x}\ln 2 - {3^x}\ln 3} \over {\left( {1 + x{3^x}} \right) + x\left( {1 + x\ln 3} \right){3^x}}} = \ln 2 - \ln 3 = \ln \left( {{2 \over 3}} \right)$

7) ${\exp\lim_{x\to0}\frac1{x^2}\ln\left(\frac{1+x2^x}{1+x3^x}\right)} = {\exp(\ln{2 \over 3}})= {2 \over 3}$

• Hi! Can you please explain how did you get the ending term in the first step? – DanaS Nov 16 '15 at 17:39

Define $f(x) = x(2^x-3^x)/(1+x3^x).$ Then the expression equals $(1+f(x))^{1/x^2}.$ Apply $\ln$ to get

$$\tag 1 \frac{1}{x^2}\ln ( 1 +f(x))=\frac{f(x)}{x^2}\frac{\ln ( 1 +f(x))}{f(x)}.$$

Now $f(x) \to 0$ as $x\to 0.$ Because $[\ln(1+u)]/u \to 1$ as $u\to 0$ (simply because $\ln'(1) = 1),$ the second fraction in $(1)$ $\to 1.$ The first fraction equals

$$\tag 2 \frac{2^x-3^x}{x}\frac{1}{1+x3^x}.$$

Let $g(x) = 2^x-3^x.$ The first fraction in $(2)$ is just $(g(x) - g(0))/x \to g'(0) = \ln 2 - \ln 3 = \ln (2/3).$ The second fraction in $(2)$ goes to $1.$

Putting it together, the $\ln$ of our expression $\to \ln (2/3),$ which implies the desired limit is $2/3.$

$\lim_{x\to0} f(x)\\ \text{where } f(x) =\left(\frac{1+xa^x}{1+xb^x}\right)^\frac1{x^2}$

Let $g(x, a) =x a^x$. For small $x$, $g(x, a) =xe^{x \ln a} \approx x(1+x \ln a + x^2 \ln^2a/2 + O(x^3)) = x(1+x \ln a + O(x^2))$ so

$\begin{array}\\ \frac{1+xa^x}{1+xb^x} &\approx \frac{1+x(1+x \ln a + O(x^2))}{1+x(1+x \ln b + O(x^2))}\\ &\approx (1+x(1+x \ln a + O(x^2)))(1-(x(1+x \ln b + O(x^2)))+x^2+O(x^2))\\ &= (1+x+x^2 \ln a + O(x^3))(1-x-x^2 (\ln b-1) + O(x^3))\\ &=1+x^2(\ln a-1 - (\ln b -1))+O(x^3)\\ &=1+x^2(\ln(a/b))+O(x^3)\\ \end{array}$

so, since $(1+ax)^{1/x} \approx e^{a}$ as $x \to 0$,

$f(x) \approx (1+x^2(\ln(a/b))+O(x^3))^{1/x^2} \approx e^{\ln(a/b)} =\frac{a}{b}$.

Note that $\lim\limits_{x\to0} xn^x=0$. Next, use the L'Hospital's rule twice to get $$\lim_{x\to0}\frac{\ln \left({1+xn^x}\right)}{x^2}= \lim_{x\to0}\frac{\frac{x n^x \ln ^2n+2 n^x \ln n}{x n^x+1}-\frac{\left(n^x+x n^x \ln n\right)^2}{\left(x n^x+1\right)^2}}{2} =\frac{2 \ln n-1}{2}$$ Now $$\lim_{x\to0}\frac{\ln\left(\frac{1+x2^x}{1+x3^x}\right)}{x^2}= \lim_{x\to0}\frac{\ln\left({1+x2^x}\right)-\ln\left({1+x3^x}\right)}{x^2} =\frac{2 \ln 2-1}{2} - \frac{2 \ln 3-1}{2} = \ln \frac{2}{3}$$

Finally, take exponent to get $$\lim_{x\to0}\left(\frac{1+x2^x}{1+x3^x}\right)^\frac1{x^2}=\frac{2}{3}$$

Note $$\frac{d}{dx} n^x = n^x \ln n$$ $$\frac{d}{dx}\ln \left({1+xn^x}\right)=\frac{n^x+x n^x\ln n }{1+xn^x}$$ $$\frac{d^2}{dx}\ln \left({1+xn^x}\right)=\frac{d^2}{dx}\frac{n^x+x n^x\ln n }{1+xn^x}= \frac{(2n^x\ln n +x n^x(\ln n)^2)(1+xn^x)-(n^x+x n^x\ln n)^2 }{(1+xn^x)^2}= \frac{x n^x \ln ^2n+2 n^x \ln n}{x n^x+1}-\frac{\left(n^x+x n^x \ln n\right)^2}{\left(x n^x+1\right)^2}$$

• Hi! Can you please explain how did you apply L'Hopital's rule twice to get (2lnn-1)/2? I am unable to have any ln terms if I apply the rule. Thanks! – DanaS Nov 16 '15 at 17:38
• you differentiate the numerator and denumerator twice, i.e. $\lim\frac{f}{g}=\lim\frac{f'}{g'}=\lim\frac{f''}{g''}$ – Michael Medvinsky Nov 16 '15 at 20:37
• please see the edit – Michael Medvinsky Nov 17 '15 at 23:58