Limits using Maclaurins expansion for $\lim_{x\rightarrow 0}\frac{e^{x^2}-\ln(1+x^2)-1}{\cos2x+2x\sin x-1}$ $$\lim_{x\rightarrow 0}\frac{e^{x^2}-\ln(1+x^2)-1}{\cos2x+2x\sin x-1}$$
Using Maclaurin's expansion for the numerator gives:
$$\left(1+x^2\cdots\right)-\left(x^2-\frac{x^4}{2}\cdots\right)-1$$
And the denominator:
$$\left(1-2x^2\cdots\right) + \left(2x^2-\frac{x^4}{3}\cdots\right)-1$$
$$\therefore \lim_{x\rightarrow 0} f(x) = \frac{-\dfrac{x^4}{2}}{-\dfrac{x^4}{3}} = \frac{3}{2}$$
But Wolfram gives that the limit is $3$.
I thought, maybe I used too few terms. What is a thumb rule for how many terms in expansion to use to calculate limits?
Using three terms yielded the answer $\lim_{x\rightarrow 0}f(x) = -4$.
What did I do wrong?

Doing almost the same as mixedmath, I have very slightly different results since 
$$e^{x^2} = 1+x^2+\frac{x^4}{2}+\frac{x^6}{6}+\frac{x^8}{24}+O\left(x^9\right) $$
$$\ln(1 + x^2) = x^2-\frac{x^4}{2}+\frac{x^6}{3}-\frac{x^8}{4}+O\left(x^9\right)$$
$$\cos(2x)=1-2 x^2+\frac{2 x^4}{3}-\frac{4 x^6}{45}+\frac{2 x^8}{315}+O\left(x^9\right)$$
$$2x\sin x =2 x^2-\frac{x^4}{3}+\frac{x^6}{60}-\frac{x^8}{2520}+O\left(x^9\right)$$ So, for the numerator, $$x^4-\frac{x^6}{6}+\frac{7 x^8}{24}+O\left(x^9\right)$$ and for the denominator $$\frac{x^4}{3}-\frac{13 x^6}{180}+\frac{x^8}{168}+O\left(x^9\right)$$ Performing the long division $$\frac{e^{x^2}-\log \left(x^2+1\right)-1}{2 x \sin (x)+\cos (2 x)-1}\approx 3+\frac{3 x^2}{20}+\cdots$$ For sure, the limit is the same, but pushing the expansion a little bit allows to see how is this limit approached.
If you push a little more the expansions, you should find that $$\frac{e^{x^2}-\log \left(x^2+1\right)-1}{2 x \sin (x)+\cos (2 x)-1}\approx 3+\frac{3 x^2}{20}+\frac{2391 x^4}{2800}+\cdots$$ and you should be amazed to see how this approximation is close to the expression (just for curiosity, graph on the same plot the function and this last approximation for $-1 \leq x \leq 1$).
