<s>[INST] Compute this limit $\lim_{x\to0}\frac{\sin(x^2+\frac{1}{x})-\sin\frac{1}{x}}{x}$ using L'Hôpital's rule I have asked this problem before, but I can't understand the explanation, I couldn't understand how the sin multiply for cos, and too multiply for A + and - B: $$\sin(A)-\sin(B)=2\sin\left(\frac{A-B}{2}\right)\cos\left(\frac{A+B}{2}\right)$$ and I don't understand in this step how/why the $A-B$ and $A+B$ was replaced by $\frac{x^2}{2}$ and $\frac{x^2}{2}+\frac{1}{x}$ :
$$\lim_{x\to0}\frac{\sin\left(x^2+\frac1x\right)-\sin\left(\frac1x\right)}{x}= \lim_{x\to0}\frac{2\sin\left(\frac{x^2}{2}\right)\cos\left(\frac{x^2}{2}+\frac1x\right)}{x}.$$
 [/INST] Hint:its easy to prove  $$\sin(x+y)+\sin(x-y)=2\sin(x)\cos(y)$$
then put $y=\frac{A+B}{2}$,$x=\frac{A-B}{2}$
$$ \sin(x)\sim x$$  $$\ cosx\sim1-\frac{x^2}{2}$$ because $$\lim_{x\to0}\frac{sinx}{x}=\lim_{x\to0}\frac{cosx}{1-\frac{x^2}{2}}=1$$
</s>