For which value(s) of a and b do we have, : $\lim_{x\to 0}{\frac{e^x+a x \sin(2x)-b \cos(2x)-x}{x^2}}=\frac{9}{2}?$ I have a limit 
$$\lim_{x\to 0}{\frac{e^x+a x \sin(2x)-b \cos(2x)-x}{x^2}}=\frac{9}{2},$$
where $a,b\in\mathbb{R}$, and I want to find $a$ and $b$.
In other cases, I evaluate the limits of numerator and denominator separately, which results in a relationship between $a$ and $b$. But now both the denominator and numerator are going to zero. How can I solve this problem?
 A: Firstly, $e^x+ax\sin2x-b\cos2x-x=0$ for $x=0$, which gives $b=1$.
Hence, 
$$\lim_{x\to 0}\frac{e^x+ax\sin2x-b \cos2x-x}{x^2}=$$
$$=\lim_{x\to 0}\frac{e^x+a x\sin2x-\cos2x-x}{x^2}=$$
$$=\lim_{x\to 0}\frac{e^x+a(\sin2x+2x\cos2x)+2\sin2x-1}{2x}=$$
$$=\lim_{x\rightarrow0}\left(\frac{e^x-1}{2x}+\frac{a\sin2x}{2x}+a\cos2x+2\cdot\frac{\sin2x}{2x}\right)=\frac{1}{2}+a+a+2,$$
which gives $a=1$.
A: From Taylor expansion at $x=0$ we have, $$\sin(2x)\sim 2x-\frac{(2x)^3}{6}$$
$$\cos(2x)\sim 1-\frac{(2x)^2}{4}$$
$$e^x \sim 1+x+\frac{x^2}{2}$$
Hence, 
$$ \frac{e^x+ax\sin2x-b \cos2x-x}{x^2}\sim \frac{1+x+\frac{x^2}{2} +2ax^2 -ax\frac{(2x)^3}{6} -b-b\frac{(2x)^2}{4}-x}{x^2}\\= \frac{1-b + (\frac{1}{2} -b+2a)x^2  -ax\frac{(2x)^3}{6} }{x^2} $$
Hence, 
$$\lim_{x\to 0}\frac{e^x+ax\sin2x-b \cos2x-x}{x^2}= \frac{1}{2} -b+2a + \lim_{x\to 0}\frac{1-b  }{x^2} =\begin{cases} \frac{1}{2} -b+2a & b=1\\
\infty& b<1\\-\infty& b>1
 \end{cases}$$
Necessary we have, $b=1$ and, $\frac92= -frac12 +2a$  that is, $a=2$
We have $$\color{red}{a=2,~~~\text{and}~~~b=1}$$
