<s>[INST] limit of $\frac{1-\sin x+\cos x }{x-\frac{\pi }{2}}$ how can i show that
$$\lim _{x\to \frac{\pi }{2}}\left(\frac{1-\sin \:x\:+\cos \:x\:}{x-\frac{\pi }{2}}\right)=-1$$
$$\left(\frac{1-\sin \:x\:+\cos \:x\:}{x-\frac{\pi }{2}}\right)=\left(\frac{1+\cos \:x -\sin x}{x-\frac{\pi }{2}}\right)$$
any help thanks
 [/INST] $$\lim _{x\to \frac{\pi }{2}}\left(\frac{1-\sin \:x\:+\cos \:x\:}{x-\frac{\pi }{2}}\right)=\\
\lim _{x\to \frac{\pi }{2}}\left(\frac{1-\sin \:x\:}{x-\frac{\pi }{2}}\right)+\lim _{x\to \frac{\pi }{2}}\left(\frac{\cos \:x\:}{x-\frac{\pi }{2}}\right)=\\
\lim _{x\to \frac{\pi }{2}}\left(\frac{\sin(\frac{\pi}{2})-\sin x}{x-\frac{\pi }{2}}\right)+\lim _{x\to \frac{\pi }{2}}\left(\frac{\sin(\frac{\pi}{2}- x)}{x-\frac{\pi }{2}}\right)=\\
\lim _{x\to \frac{\pi }{2}}\left(\frac{2\sin(\frac{\frac{\pi}{2}-x}{2}).\cos(\frac{\frac{\pi}{2}+x}{2})}{-(\frac{\pi }{2}-x)}\right)+\lim _{x\to \frac{\pi }{2}}\left(\frac{\sin(\frac{\pi}{2}- x)}{-(\frac{\pi }{2}-x)}\right)=\\$$
so $$2(\frac{1}{-2})\lim _{x\to \frac{\pi }{2}}\cos(\frac{\frac{\pi}{2}+x}{2})+\underbrace{\lim _{x\to \frac{\pi }{2}}\left(\frac{\sin(\frac{\pi}{2}- x)}{-(\frac{\pi }{2}-x)}\right)}_{-1}=\\-1(0)+(-1)=-1$$
</s>