What is the limit of this trig function? How do I find $$\lim_{x \to \pi/4}{\frac{\cos x-\frac{1}{\sqrt2}}{x-\frac\pi4}}$$? 
I've tried setting the denominator equal to $h$, then replacing $x$ in terms of $h$, but I still don't know how to manipulate it to look like $\frac{\cos h-1}h$.
 A: As other have said, that is the definition of derivative of $\cos x$ at $x = \pi/4$.
To see why is that, set $h = x - \pi/4$, then you get 
$$\lim_{h \to 0} \frac{\cos(\pi/4 + h) - \cos(\pi/4)}h$$
So if you know that the derivative of $\cos x $ is $-\sin x$, you are done.
On may argue though that this is like cheating; so how to prove the limit without using the definition of derivative then?
rewrite the expression as $$\frac{\cos h \cos \pi/4 - \sin h \sin \pi/4 - \cos \pi/4}h = \frac{\frac{1}{\sqrt{2}} (\cos h - \sin h - 1)}h = \frac{1}{\sqrt 2} \frac{\cos h - 1}{h} - \frac{1}{ \sqrt 2} \frac{\sin h}h$$ 
And you know that $\lim_{h \to 0}\frac{\sin h}h = 1$, and $\lim_{h \to 0} \frac{\cos h - 1}{h}  = 0$, so your limit is $-\frac{1}{ \sqrt 2}$
A: $$\displaystyle{\lim_{x\to\frac\pi4}\frac{\cos x-\frac{1}{\sqrt2}}{x-\frac\pi4}}$$
$$=\displaystyle{\lim_{x\to\frac\pi4}\frac{\cos x-\cos\frac\pi4}{x-\frac\pi4}}$$
$$=\frac{d(\cos x)}{dx}_{(\text{ at }x=\frac\pi4)}$$
A: Hint:
Assuming you're taking the limit as $x\to\frac{\pi}{4}$, you can recognize the limit as a derivative.
A: By L'Hôpital's rule we have $$\lim\limits_{x\to\frac{\pi}{4}}{\frac{\cos x-\frac{1}{\sqrt2}}{x-\frac\pi4}}=-\lim\limits_{x\to\frac{\pi}{4}}{\sin x}=-\frac{1}{\sqrt2}$$
A: The easiest way is using L'Hopital. Other way would be writing $\displaystyle \cos(x)-\frac{1}{\sqrt{2}}=\cos(x)-\cos\left(\frac{\pi}{4}\right)=-2\sin\left(\frac{x+\frac{\pi}{4}}{2}\right)\sin\left(\frac{x-\frac{\pi}{4}}{2}\right)$
Now, $$\displaystyle \lim_{\Large x\to \frac{\pi}{4}}\frac{\cos x-\frac{1}{\sqrt{2}}}{x-\frac{\pi}{4}}=\lim_{\Large x\to\frac{\pi}{4}}\frac{\large -2\sin\left(\frac{x+\frac{\pi}{4}}{2}\right)\sin\left(\frac{x-\frac{\pi}{4}}{2}\right)}{\large 2\left(\frac{x-\frac{\pi}{4}}{2}\right)}$$
Now, we can cancel the 2 and use the familiar limit $\displaystyle \lim_{t\to 0}\frac{\sin(t)}{t}=1$ and find that $$\lim_{\Large x\to \frac{\pi}{4}}\frac{\cos x-\frac{1}{\sqrt{2}}}{x-\frac{\pi}{4}}=-\frac{1}{\sqrt{2}}$$
