# Calculate limit or prove it does not exist [duplicate]

$$\lim_{x\to \pi}\frac{\cos(\frac{x}{2})}{\pi^2-x^2}$$

I thought to change $x$ with $t$ like this:

$$\lim_{t\to 0}\frac{\cos(\frac{t+\pi}{2})}{\pi^2-(t+\pi)^2}$$

Now I'm not sure how to continue.. Also I'm not allowed to use l'hopital rule or derivative at all. Thank you

Change variable $x=\pi-y$ $$A=\frac{\cos \left(\frac{x}{2}\right)}{\pi ^2-x^2}=\frac{\sin \left(\frac{y}{2}\right)}{2 \pi y-y^2}$$ Now $y=2z$ $$A=\frac 14\frac{\sin (z)}{\pi z- z^2}=\frac 1 {4\pi}\frac{\sin(z)}z \frac 1 {1-\frac z \pi}$$
Since $cos(\frac {\pi}{2})$ is exactly zero, the limit converges to zero. This is very easy to prove by definition, have a go at it yourself.
Write the given function as $$\frac{\sin {x} }{2\cdot\sin\frac{x} {2}\cdot(\pi-x) \cdot(\pi+x)}$$ using $\sin2x=2\sin{x} \cos{x}$. Write $\sin{x} = \sin(\pi-x)$. Then $\sin(\pi-x)$ and $(\pi-x)$ cancel out. The expression now is $$\lim_{x\to \pi} \frac{1}{2\cdot\sin\left(\frac{x}{2}\right)\cdot(\pi+x)}$$ which yields the answer $\frac{1}{4\pi}$.