Limits with L'Hôpital's rule Find the values of $a$ and $b$ if $$ \lim_{x\to0} \dfrac{x(1+a \cos(x))-b \sin(x)}{x^3} = 1 $$
I think i should use L'Hôpital's rule but it did not work.
 A: The easiest way (in my opinion) is to plug in the power series expansion of $x(1+a\cos x)-b\sin x$ around zero. Then, the limit becomes
$$\lim_{x\rightarrow 0} \frac{x(a-b+1)+x^3(b-3a)/6+O(x^5)}{x^3}=1.$$
Now you have two equations involving $a$ and $b$ to satisfy (can you figure out what those equations are?)
A: use the equivalent, near $0$
\begin{eqnarray*}
\cos x &\approx &1-\frac{x^{2}}{2} \\
\sin x &\approx &x-\frac{x^{3}}{6}
\end{eqnarray*}
\begin{eqnarray*}
\frac{x(1+a\cos x)-b\sin x}{x^{3}} &\approx &\frac{x(1+a\left( 1-\frac{x^{2}%
}{2}\right) )-b\left( x-\frac{x^{3}}{6}\right) }{x^{3}} \\
&=&\frac{x+ax-a\frac{x^{3}}{2}-bx+\frac{bx^{3}}{6}}{x^{3}} \\
&=&\frac{(1+a-b)x+x^{3}(\frac{b-3a}{6})}{x^{3}} \\
&=&\frac{(1+a-b)}{x^{2}}+\frac{b-3a}{6}
\end{eqnarray*}
It suffices to choose $a$ and $b$ such that
\begin{equation*}
(1+a-b)=0\ \ \ \ \ and\ \ \ \ \ \ b-3a=6
\end{equation*}
that is 
\begin{equation*}
a=-\frac{5}{2},\ \ \ and\ \ b=-\frac{3}{2}
\end{equation*}
A: You can, unless using L'Hospital's rule repeatedly, which  is not the alpha and omega of limit computations. The simplest way to go is to use Taylor's polynomial:
$$ \cos x=1-\dfrac{x^2}2+o(x^2),\quad \sin x=x-\frac{x^3}6+o(x^3),$$
whence 
$$x(1+a\cos x)-b\sin x=(1+a-b)x+\Bigl(\frac b6-\frac a2\Bigr)x^3+o(x^3) $$
$$\frac{x(1+a\cos x)-b\sin x}{x^3}= \frac{(1+a-b)x+\Bigl(\dfrac b6-\dfrac a2\Bigr)x^3+o(x^3)}{x^3}. $$
For the limit to be equal to $1$, the following equations must be satisfied:
$$\begin{cases}
a-b+1=0,\\\dfrac b6-\dfrac a2=1.
\end{cases}$$
