<s>[INST] What is $ \lim_{x \rightarrow 0}\left(\frac{1}{\ln\cos (x)}+\frac{2}{\sin ^{2}(x)}\right) $? The answer of the following limit:
$$
\lim_{x \rightarrow 0}\left(\frac{1}{\ln \cos (x)}+\frac{2}{\sin ^{2}(x)}\right)
$$
is 1 by Wolfram Alpha.
But I tried to find it and I got $2/3$ :
My approach :
$1)$
$
\ln(\cos x)=\ln\left(1-\frac{x^{2}}{2}+o\left(x^{3}\right)\right)=-\frac{x^{2}}{2}+o\left(x^{3}\right)
$
$2)$
$
\sin ^{2}(x)=\left(x-\frac{x^{3}}{3!}+o\left(x^{3}\right)\right)^{2}=x^{2}-\frac{x^{4}}{3}+o\left(x^{4}\right)
$
$3)$
$\begin{aligned} \frac{1}{-\frac{x^{2}}{2}+o\left(x^{3}\right)}+\frac{2}{x^{2}-\frac{x^{4}}{3}+o\left(x^{4}\right)}=\frac{-x^{2}+x^{2}-\frac{x^{4}}{3}+o\left(x^{3}\right)}{-\frac{x^{4}}{2}+o\left(x^{5}\right)}=\frac{-\frac{1}{3}+o\left(x^{3}\right)}{-\frac{1}{2}+o\left(x^{5}\right)} \end{aligned}$
$4)$
$\lim _{x \rightarrow 0} \frac{-\frac{1}{3}+o\left(x^{3}\right)}{-\frac{1}{2}+o\left(x^{5}\right)}=\frac{-\frac{1}{3}}{-\frac{1}{2}}=\frac{2}{3}$
So where is the mistake in my approach?
Note: $o$ denotes the little-o notation
Edit : I've understood where's my mistake is, but another question popped up reading the answers which is : does $o(1/x)$ tends to zero as x tends to zero?
 [/INST] Hint:
$$\dfrac1{\ln\cos x}=\dfrac2{\ln(1-\sin^2x)}$$
Now writing $\sin^2x=y,$
$$\lim_{y\to0^+}2\cdot\dfrac{y+\ln(1-y)}{y\ln(1-y)}=2\lim_y\dfrac{y+\left(-y-y^2/2-y^3/3-\cdots\right)}{-y^2\cdot\dfrac{\ln(1-y)}{-y}}=?$$
</s>