On evaluating $$f(x)=\begin{cases} \frac{x\ln(\cos x)}{\ln(1+x^2)} & x\neq0,\\0& x=0\end{cases}$$ all the solutions I've seen used the L'Hôpital's rule to break it down; that way, you find out that the function is continuous at x=0, becoming 0 there.
I used $\lim_{x^2 \to 0} \frac{\ln(1+x^2)}{x^2}=0$ and logarithmic properties to simplify it to $\lim_{x \to 0}\ln(\cos x)^{ \frac{1}{x}}$;
Defining h as a small positive value, as x approaches 0 from the right, it becomes h. As cosx approaches 0 from the right, it becomes 1-h. Thus the right-hand limit becomes $\lim_{h \to 0^+}ln(1-h)^\frac{1}{h}$. This becomes $ln0=-\infty$
Similarly, as x approaches 0 from the left, it becomes -h. As cosx approaches 0 from the left, it becomes 1-h, the same as before. Thus the left-hand limit becomes $\lim_{h \to 0^+}ln(1-h)^\frac{-1}{h}$. This is $\lim_{h \to 0^+}ln\frac{1}{(1-h)^\frac{1}{h}}$, which becomes $ln\infty$, which is $\infty$.
As the limit doesn't seem to exist as per my evaluation, am I supposed to use only the L'Hôpital's Rule in indeterminate forms?