When I evaluate the integral $$\lim_{x \to 0} \frac{\log(1+x+x^2)+\log(1+x^2-x)}{\sec x-\cos x}$$
by using the identity $\lim_{x \to 0} \log(1+x)=x$, it simplifies to $$\lim_{x \to 0} \frac{x+x^2+x^2-x}{\sec x-\cos x}$$ assuming $\lim_{x \to 0} x^2±x=0$. Therefore the limit evaluates to 2 as the numerator evaluates to $x^2$. But if I multiply the expressions inside the log together by $\log(a)+\log(b)=\log(ab)$, I get $$\lim_{x \to 0} \frac{\log(1+x^2+x^4)}{\sec x-\cos x}$$ which evaluates to 1. Why does this happen?