limit using taylor series I keep getting an error in the expansion
$$\lim_{x\to 0 }\frac{2\exp(\sin(x))-2-x-x^2-\arctan (x) }{x^3}$$
The numerator works out as
$$\approx 2 (1+\sin(x) + 1/2 \sin^2(x)) -2-x-x^2 - (x-x^3/3+x^5/5)$$
$$\approx 2(1+x-x^3/3!+1/2(x-x^3/3!)^2 -2-2x+x^3/3-x^2 -x^5/5 $$
$$ = o(x^4)$$
so that the limit is zero. But it is supposed to be $1/3$. Where is my mistake?
 A: You need to expand the exponential by one more term as $(\sin(x))^3$ will still contribute something of order $x^3$. 
Indeed, it contributes just $x^3$, which multiplied by $1/3!$ and then $2$ is just what you miss. 
A: Use the fact

$$e^{\sin(x)} \sim_{x\sim 0} 1+x+x^2/2-x^4/8.  $$

A: $$\newcommand{\b}[1]{\left(#1\right)}
\newcommand{\O}{{\mathbb O}}
\sin x=x-\frac16x^3+\O(x^5)\\
e^x=1+x+\frac12x^2+\frac16x^3+\O(x^5)\\
\arctan x=x-\frac13x^3+\O(x^5)$$
Now:
$$e^{\sin x}=1+\sin x+\frac12\sin^2 x+\O(x^3)\\
=1+\b{x-\frac16x^3+\O(x^5)}+\frac12\b{x-\frac16x^3+\O(x^5)}^2+\frac16\b{x-\frac16x^3+\O(x^5)}^3+O(x^5)\\
=1+\b{x-\frac16x^3+\O(x^5)}+\frac12\b{x^2-\frac13x^4+\O(x^5)}+\frac16\b{x^3+\O(x^5)}+\O(x^5)\\
=1+x+\frac12x^2+\O(x^5)$$
Now:
$$2e^{\sin x}-2-x-x^2=x+\O(x^5)$$
So:
$$2e^{\sin x}-2-x-x^2-\arctan x=\frac13x^3+\O(x^5)$$
Now:
$$\lim_{x\to0}\frac{2e^{\sin x}-2-x-x^2-\arctan x}{x^3}=\lim_{x\to0}\frac{\frac13x^3+\O(x^5)}{x^3}=\frac13$$
Anyways Why don't you use L'Hospital?
$$\lim_{x\to 0 }\frac{2\exp(\sin(x))-2-x-x^2-\arctan (x) }{x^3}
\\=\lim_{x\to 0 }\frac{2\cos x\exp(\sin(x))-1-2x-\frac1{x^2+1} }{3x^2}
\\=\lim_{x\to 0 }\frac{2(\cos^2x-\sin x)\exp(\sin(x))-2+\frac{2x}{(x^2+1)^2} }{6x}
\\=\lim_{x\to 0 }\frac{\frac{2-6x^2}{(x^2+1)^3}-2\sin xe^{\sin x}(\sin x+3)}{6}
\\=\frac{\frac{2-6\times0^2}{(0^2+1)^2}-2\times0\times e^0(0+3)}{6}
\\=\frac{2}{6}=\frac13$$
A: Starting from $$e^y=1+y+\frac{y^2}{2}+\frac{y^3}{6}+\frac{y^4}{24}+O\left(y^5\right)$$ Replace $y$ by the expansion of $\sin(x)$ to get $$e^{\sin(x)}=1+x+\frac{x^2}{2}-\frac{x^4}{8}-\frac{x^5}{15}+O\left(x^6\right)$$ Just as quid answered while I was typing, one term was missing in the expansion.
