<s>[INST] Calculating $\lim_{x\to 0}\frac{x^2+x\cdot \sin x}{-1+\cos x}$ Without L'Hopital,
$$\lim_{x\to 0}\frac{x^2+x\cdot \sin x}{-1+\cos x}$$
That's
$$\frac{x^2+x\cdot \sin x}{-1+\left(1-2\sin^2\frac{x}{2}\right)} = \frac{x^2+x\cdot \sin x}{-2\sin^2\frac{x}{2}}$$
Let's split this
$$\frac{x\cdot x}{-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}} + \frac{x\cdot \sin x}{-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}}$$
On the left one, it would be great to have $\frac{x}{2} \cdot \frac{x}{2}$. To do so, I will multiply and divide by $\frac{1}{4}$:
$$\frac{\frac{x}{2}\cdot \frac{x}{2}}{\frac{1}{4}\cdot-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}} + \frac{x\cdot \sin x}{-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}}$$
Then we use the identity $\frac{x}{\sin x} = 1$:
$$-2 + \frac{x\cdot \sin x}{-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}}$$
On the right side, I'd like to have $\frac{x}{2}$ there, so I will multiply and divide by $\frac{1}{2}$:
$$-2 + \frac{\frac{x}{2}\cdot \sin x}{-2\cdot\sin\frac{x}{2}\cdot \sin\frac{x}{2}\cdot\frac{1}{2}}$$
We use the identity $\frac{x}{\sin x} = 1$:
$$-2 + \frac{\sin x}{-2\cdot\sin\frac{x}{2}\cdot\frac{1}{2}}$$
Hmm... we could perform the addition I suppose:
$$\frac{\sin x - 2(-2\cdot\sin\frac{x}{2}\cdot\frac{1}{2})}{-2\cdot\sin\frac{x}{2}\cdot\frac{1}{2}}$$
Simplify:
$$\frac{\sin x + (4\cdot-2\sin\frac{x}{2}\cdot-2\frac{1}{2})}{-2\cdot\sin\frac{x}{2}\cdot\frac{1}{2}} = \frac{\sin x +8\sin\frac{x}{2}}{\sin\frac{x}{2}}$$
Then
$$\frac{\sin x}{\sin\frac{x}{2}} + \frac{8\sin\frac{x}{2}}{\sin\frac{x}{2}} = \frac{\sin x}{\sin\frac{x}{2}} + 8$$
I'm close! The answer should be $-4$, but I don't know what to do with
$$\frac{\sin x}{\sin\frac{x}{2}} + 8$$
So basically I need to know what to do with $\frac{\sin x}{\sin\frac{x}{2}}$, but I also included my whole procedure just in case I've been doing it wrong all along.
 [/INST] Notice, $$\lim_{x\to 0 }\frac{x^2+x\sin x}{-1+\cos x}$$
$$=\lim_{x\to 0 }\frac{x^2+x\sin x}{-1+1-2\sin ^2\frac{x}{2}}$$
$$=-\frac{1}{2}\lim_{x\to 0}\frac{x\sin x+x^2}{\sin ^2\frac{x}{2}}$$
$$=-\frac{1}{2}\lim_{x\to 0}\frac{x^2\left(\frac{\sin x}{x}+1\right)}{\sin ^2\frac{x}{2}}$$
$$=-2\lim_{x\to 0}\frac{\frac{\sin x}{x}+1}{\left(\frac{\sin \frac{x}{2}}{\frac{x}{2}}\right)^2}$$
$$=-2\left(\frac{1+1}{1^2}\right)=-2(2)=\color{red}{-4}$$
</s>