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?

In a case where $x \to 0$ as here, if the two expansions of top and bottom happen to start with the same degree, the limit is the ratio of the coefficients. Here, the top expansion starts with $x^4$ while the bottom starts with $x^4/3$ making the limit $3.$
That is, we have 
$$\frac{x^4+\cdots}{x^4/3+\cdots},$$
and when top and bottom are divided by $x^4$ the top becomes $1$ plus terms going to zero, while the bottom becomes $1/3$ plus terms going to zero, as $x\to 0.$
[note there are some signs to keep track of, in seeing that each of top and bottom actually start out with a nonzero fourth power.]
