Calculus Derivative—Finding unknown constants 
Find all values of $k$ and $l$ such that
  $$\lim_{x \to 0} \frac{k+\cos(lx)}{x^2}=-4.$$

Any help on how to do this would be greatly appreciated.
 A: Note that
$$\lim \frac{1-\cos x}{x^2}=\frac{1}{2}$$
And that $$\frac{k+\cos(lx)}{x^2}=\frac{k+1}{x^2}-\frac{1-\cos(lx)}{x^2}$$
Thus $$k+1=0$$and $$\frac{1}{2}l^2=4$$
A: (Without involving big O notation). The limit of denominator goes to zero  and numerotor goes to $k+1$ as $x\rightarrow 0$. Since the limit exists, $k+1=0$ and hence $k=-1$. Then applying L-H rule ( since we have $\frac{0}{0}$ indeterminate form) we get $\lim_{x\rightarrow 0}\frac{-\ell\sin(\ell x)}{2x}$ which is equal to $\frac{-\ell^2}{2}$. Therefore, $-\frac{\ell^2}{2}=-4\Rightarrow \ell=2\sqrt{2}$ or $\ell=-2\sqrt{2}$. 
A: We have
$$
k+\cos(lx)=k+\left(1-\frac{l^2x^2}{2}+O\left(x^4\right)\right)
$$
dividing by $x^2$ we have 
$$
\frac{k+\cos(lx)}{x^2}=\frac{k+1}{x^2}-\frac{l^2}{2}+O\left(x^2\right)
$$
from which you need $k=-1$ (or this explodes) and $l^2=8\implies l=\pm 2\sqrt{2}$ to get your desired value.
edit: without big-O: Using the series definition for $\cos$, 
$$
k+\cos(lx)=k+1-\frac{l^2x^2}{2}+\sum_{k=2}^\infty\frac{x^{2k}l^{2k}}{(2k)!}\\
\implies 
\frac{k+\cos(lx)}{x^2}=\frac{k+1}{x^2}-\frac{l^2}{2}+\sum_{k=2}^\infty\frac{x^{2k-2}l^{2k}}{(2k)!}
$$
where the series on the right is $0$ when $x=0$. Conclude as in the above.
