Find the $\lim_{n \to 0} (\cos(x)+\tan^2(x))^{\csc(x)}$ 
Find the $\lim_{x \to 0} (\cos(x)+\tan^2(x))^{\csc(x)}$

I've attempted logarithmic differentiation, in which I take 
$$\lim_{x \to 0} (\cos(x)+\tan^2(x))^{\csc(x)} = \exp\bigg(\lim_{x \to 0} \frac {\ln(\cos(x)+\tan^2(x)}{\sin^2(x)}\bigg)$$
Using L'hopital rule, I've derived the following: 
$$ = \exp\bigg(\lim_{x \to 0} \frac {-\sin(x) + 2\tan(x)\sec^2(x)}{\cos(x) + \tan^2(x)} . \frac {1}{2\sin(x)\cos(x)}\bigg)$$
Now, I've derived that $\lim_{x \to 0} \frac {-\sin(x) + 2\tan(x)\sec^2(x)}{\cos(x) + \tan^2(x)} = 0$, which would then make the whole limit function $0 \implies e^0 = 1$, in which I doubt this question would be this easy. 
What did I do wrong? 
 A: simplifying the derivative of the numerator and denominator we get $$-{\frac { \left(  \left( \cos \left( x \right)  \right) ^{3}-2
 \right) \sin \left( x \right) }{ \left(  \left( \cos \left( x
 \right)  \right) ^{3}- \left( \cos \left( x \right)  \right) ^{2}+1
 \right)  \left( \cos \left( x \right)  \right) ^{2}}}
$$
A: $$\lim_{x \to 0} (\cos x+\tan^2 x)^{\csc x}=$$
$$=\lim_{x\to 0}\left((1+(\cos x+\tan^2 x-1))^{\frac{1}{\cos x+\tan^2 x-1}}\right)^{(\cos x+\tan^2 x-1)\csc x}=$$
$$=e^{\ln\left(\lim_{x\to 0}\left((1+(\cos x+\tan^2 x-1))^{\frac{1}{\cos x+\tan^2 x-1}}\right)^{(\cos x+\tan^2 x-1)\csc x}\right)}=$$
$\ln$ is continuous, so you can switch $\ln$, $\lim$.
$$=e^{\lim_{x\to 0}\ln\left(\left((1+(\cos x+\tan^2 x-1))^{\frac{1}{\cos x+\tan^2 x-1}}\right)^{(\cos x+\tan^2 x-1)\csc x}\right)}=$$
$$=e^{\lim_{x\to 0}\left((\cos x+\tan^2 x-1)\csc x\right)\cdot \ln\lim_{x\to 0}\left((1+(\cos x+\tan^2 x-1))^{\frac{1}{\cos x+\tan^2 x-1}}\right)}=$$
$$=e^{\lim_{x\to 0}\left((\cos x+\tan^2 x-1)\csc x\right)\cdot \ln e}=$$
$$=e^{\lim_{x\to 0}\left((\cos x+\tan^2 x-1)\csc x\right)}=$$
$$=e^{\lim_{x\to 0}}\left(\frac{\cos x-1}{x^2}\cdot \frac{1}{\frac{\sin x}{x}}\cdot x+\frac{\sin x}{\cos^2 x}\right)=$$
$$=e^{\left(-\frac{1}{2}\right)\cdot \frac{1}{1}\cdot 0+0}=e^0=1$$
