<s>[INST] Is $\displaystyle\lim_{x\rightarrow y}\dfrac{\cos x-\cos y}{x^2-y^2}$ equal to $-\dfrac 12$ or just $-\dfrac{\sin y}{2y}$ Question:
$$\lim_{x\rightarrow y}\dfrac{\cos x-\cos y}{x^2-y^2}=?$$
Here is my try:
\begin{align}\lim_{x\rightarrow y}\dfrac{\cos x-\cos y}{x^2-y^2}&=\lim_{x\rightarrow y}\dfrac{-2 \sin (\frac 12(x+y))\sin (\frac{1}{2}(x-y))}{(x+y)(x-y)}\\
&=-\dfrac{2 \sin y}{2y}\dfrac 12\\
&=-\dfrac{\sin y}{2y}\end{align}
My question: Is $-\dfrac{\sin y}{2y}$ the final answer or can it be calculated further as $-\dfrac12$?

I also try different route:
Let $p=x-y$ so $x=p+y$ and $p\rightarrow 0$ as $x \rightarrow y$. Hence,
\begin{align}\lim_{x\rightarrow y}\dfrac{\cos x-\cos y}{x^2-y^2}&=\lim_{p\rightarrow 0}\dfrac{\cos (p+y)-\cos y}{p^2+2py+y^2-y^2}\\\\
&=\lim_{p\rightarrow 0}\dfrac{-2 \sin (\frac{1}{2}(p+2y))\sin (\frac{1}{2}p)}{p(p+2y)}\\\\
&=\lim_{p\rightarrow 0}\dfrac{-2 \sin (\frac{1}{2}(p+2y))}{(p+2y)} \dfrac{\sin (\frac{1}{2}p)}{p}\\\\
&=-\dfrac{2\sin y}{2y} \dfrac{1}{2}\\\\
&=-\dfrac{\sin y}{2y}\end{align}
Okay, so that left me with the same result. What is the correct final answer, $-\dfrac{\sin y}{2y}$ or $-\dfrac 12$?
Thanks
 [/INST] You could also have used Taylor series around $x=y$. This is $$\cos(x)=\cos (y)-(x-y) \sin (y)-\frac{1}{2} (x-y)^2 \cos (y)+O\left((x-y)^3\right)$$ Then $$\cos(x)-\cos (y)=-(x-y) \sin (y)-\frac{1}{2} (x-y)^2 \cos (y)+O\left((x-y)^3\right)$$ $$\frac{\cos(x)-\cos (y) }{x^2-y^2}=-\frac{\sin (y)}{2 y}+(x-y) \left(\frac{\sin (y)}{4 y^2}-\frac{\cos (y)}{4
   y}\right)+O\left((x-y)^2\right)$$ which shows the limit and also how it is approached.
</s>