# Evaluate $\lim_{x→0}\left(\frac{1+\tan x}{1+\sin x}\right)^{1/x^2}$

I have the following limit to evaluate:

$$\displaystyle \lim_{x→0}\left(\frac{1+\tan x}{1+\sin x}\right)^{1/x^2}$$

What's the trick here?

$$\lim_{x\to0}\left(\frac{1+\tan(x)}{1+\sin(x)}\right)^{\frac{1}{x^2}}\\ =\lim_{x\to0}\exp\left(\frac1{x^2}\ln\left(1+\frac{\tan(x)-\sin (x)}{1+\sin(x)}\right)\right)\\=\lim_{x\to0}\exp\left(\frac1{x^2}\frac{\ln\left(1+\frac{\tan(x)-\sin (x)}{1+\sin(x)}\right)}{\frac{\tan(x)-\sin (x)}{1+\sin(x)}}.\frac{\tan(x)-\sin (x)}{1+\sin(x)}\right)\\ =\lim_{x\to0}\exp\left(\frac1{x^2}\frac{\tan(x)-\sin (x)}{1+\sin(x)}\right).\exp(0)\quad\left(\text{ as }\lim_{x\to0}\frac{\ln(1+x)}{x}=0\right)\\ =\lim_{x\to0}\exp\left(\frac1{x^2}\frac{\tan x(1-\cos x)(1+\cos x)}{(1+\cos x)x}\right)\\ =\lim_{x\to0}\exp\left(\frac{\tan x}{1+\cos x}.\left(\frac{\sin x}{x}\right)^2\right)\\ =\lim_{x\to0}\exp\left(\frac{0}{1+0}.1\right)\quad\left(\text{ as }\lim_{x\to0}\frac{\sin x}{x}=1\right)\\ =1$$

Using Bernoulli's Inequality, \begin{align} \left(\frac{1+\tan(x)}{1+\sin(x)}\right)^{\large1/x^2} &=\left(1+\frac{\tan(x)-\sin(x)}{1+\sin(x)}\right)^{\large1/x^2}\\ &=\left(1+\frac{1-\cos(x)}{x^2}\frac{\tan(x)}{x}\frac1{1+\sin(x)}x^3\right)^{\large1/x^2}\\ &\ge1+\underbrace{\vphantom{\frac1{\sin(x)}}\frac{1-\cos(x)}{x^2}}_{1/2}\underbrace{\vphantom{\frac1{\sin(x)}}\frac{\tan(x)}{x}}_1\underbrace{\frac1{1+\sin(x)}}_1\underbrace{\vphantom{\frac1{\sin(x)}}x}_0\tag{1} \end{align} \begin{align} \left(\frac{1+\sin(x)}{1+\tan(x)}\right)^{\large1/x^2} &=\left(1-\frac{\tan(x)-\sin(x)}{1+\tan(x)}\right)^{\large1/x^2}\\ &=\left(1-\frac{1-\cos(x)}{x^2}\frac{\tan(x)}{x}\frac1{1+\tan(x)}x^3\right)^{\large1/x^2}\\ &\ge1-\frac{1-\cos(x)}{x^2}\frac{\tan(x)}{x}\frac1{1+\tan(x)}x\tag{2} \end{align} Therefore, $$\left(\frac{1+\tan(x)}{1+\sin(x)}\right)^{\large1/x^2}\le\frac1{\displaystyle1-\underbrace{\vphantom{\frac1{\sin(x)}}\frac{1-\cos(x)}{x^2}}_{1/2}\underbrace{\vphantom{\frac1{\sin(x)}}\frac{\tan(x)}{x}}_1\underbrace{\frac1{1+\tan(x)}}_1\underbrace{\vphantom{\frac1{\sin(x)}}x}_0}\tag{3}$$ Since both the right hand sides of $(1)$ and $(3)$ tend to $1$ as $x$ tends to $0$, by the Squeeze Theorem, $$\lim_{x\to0}\left(\frac{1+\tan(x)}{1+\sin(x)}\right)^{\large1/x^2}=1\tag{4}$$

$$\frac{1+\tan x}{1+\sin x}=1+\frac{\tan x-\sin x}{1+\sin x}=1-\frac{\sin x(1-\cos x)}{(1+\sin x)\cos x}$$

Now $\lim_{h\to0}(1+h)^{\frac1h}=e$

and

$$\frac{\sin x(1-\cos x)}{x^2(1+\sin x)\cos x}=\frac1{(1+\sin x)\cos x}\cdot\frac{\sin x}x\cdot\frac{1-\cos x}x$$

and $$\frac{1-\cos x}x=\frac{1-\cos^2 x}{x(1+\cos x)}=x\left(\frac{\sin x}x\right)^2\frac1{1+\cos x}$$

Taylor series are another chance. Since: $$\sin x = x-\frac{x^3}{6}+\ldots,$$ $$\tan x = x+\frac{x^3}{3}+\ldots$$ we have: $$\frac{1+\tan x}{1+\sin x} = 1+\frac{x^3}{2}+O(x^4)$$ as $x\to 0$, hence: $$\lim_{x\to 0}\left(\frac{1+\tan x}{1+\sin x}\right)^{\frac{1}{x^2}}=\exp\left(\lim_{x\to 0}\frac{1}{x^2}\log\frac{1+\tan x}{1+\sin x}\right)=\exp(0)=1.$$

Hint: $\ln (f(x)) = \dfrac{\ln (1+\tan x) - \ln ( 1+ \sin x)}{x^2}$. Use L'hopitale rule from here.

$$\lim_{x\to 0}\left(\frac{1+\tan x}{1+\sin x}\right)^{\frac{1}{x^2}}$$ $$=\exp\left(\lim_{x\to 0}{\frac{1}{x^2}}\left(\frac{1+\tan x}{1+\sin x}-1\right)\right)$$ $$=\exp\left(\lim_{x\to 0}{\frac{1}{x^2}}\left(\frac{\tan x-\sin x}{1+\sin x}\right)\right)$$ $$=\exp\left(\lim_{x\to 0}{\frac{1}{x^2}}\left(\frac{\frac{2tan\frac{x}{2}}{1-\tan^2\frac{x}{2}}-\frac{2tan\frac{x}{2}}{1+\tan^2\frac{x}{2}}}{1+\frac{2tan\frac{x}{2}}{1+\tan^2\frac{x}{2}}}\right)\right)$$ $$=\exp\left(\lim_{x\to 0}{\frac{1}{x^2}}\left(\frac{2\tan\frac{x}{2}\left(1+\tan^2\frac{x}{2}-1+\tan^2\frac{x}{2}\right)}{\left(1-\tan^2\frac{x}{2}\right) \left(1+\tan^2\frac{x}{2}+2\tan\frac{x}{2}\right)}\right)\right)$$ $$=\exp\left(\lim_{x\to 0}{\frac{1}{x^2}}\left(\frac{4\tan^3\frac{x}{2}}{\left(1-\tan^2\frac{x}{2}\right) \left(1+\tan^2\frac{x}{2}+2\tan\frac{x}{2}\right)}\right)\right)$$ $$=\exp\left(\lim_{x\to 0}\left(\tan\frac{x}{2}\right)\lim_{x\to 0}\left(\frac{\left(\frac{\tan\frac{x}{2}}{\frac{x}{2}}\right)^2}{\left(1-\tan^2\frac{x}{2}\right) \left(1+\tan^2\frac{x}{2}+2\tan\frac{x}{2}\right)}\right)\right)$$ $$=e^{\left(\left(0\right)\left(\frac{1}{1\times1}\right)\right)}=e^{0}=1$$