Limit as $x\to 2$ of $\frac{\cos(\frac \pi x)}{x-2} $ I am a kid trying to teach myself Calculus in order to prepare for next year. 
I have the expression
$$\lim_{x\to 2}\frac{\cos(\frac \pi x)}{x-2} $$
There is a hint that says to substitute t for $(\frac \pi2 - \frac \pi x)$ and WolframAlpha evaluates this expression as $\frac \pi4$. However, I got the answer of $1$. Can someone clarify the steps to solving this problem. 
 A: HINT:
$$\cos\dfrac\pi x=\sin\left(\dfrac\pi2-\dfrac\pi x\right)=\sin\dfrac{\pi(x-2)}{2x}$$
Now set $\dfrac{\pi(x-2)}{2x}=y$ and use $\lim_{h\to a}\dfrac{\sin(h-a)}{h-a}=1$
A: Here is my solution using only $\lim_{x \to 0} \frac{\sin(x)}{x} = 1$, using the methods the questions asks for (the $t$ substitution)
$$\lim_{x \to 2} \frac{\cos(\pi/x)}{x-2}$$
$$ = \lim_{x \to 2} \frac{\sin(\frac{\pi}{2} - \frac{\pi}{x})}{x-2}$$
substitute $t= \frac{\pi}{2} - \frac{\pi}{x}$, $\;\;x = \frac{2 \pi}{\pi-2 t}$
$$ = \lim_{t \to 0} \frac{\sin(t)}{\frac{2 \pi}{\pi-2 t}-2}$$
$$ = \lim_{t \to 0} \frac{\sin(t)}{\frac{2 \pi - 2(\pi-2 t)}{\pi-2 t}}$$
$$ = \lim_{t \to 0} \frac{(\pi-2 t)\sin(t)}{2 \pi - 2(\pi-2 t)}$$
Substitute $r = \pi-2 t$, $\;\;t = \frac{\pi-r}{2}$
$$ = \lim_{r \to \pi} \frac{r\sin(\frac{\pi-r}{2})}{2(\pi - r)}$$
$$ = \frac{1}{4}\lim_{r \to \pi} \frac{r\sin(\frac{\pi-r}{2})}{\frac{\pi-r}{2}}$$
Substitute $k = \frac{\pi-r}{2}$, $\;\;r= \pi-2k$
$$ = \frac{1}{4}\lim_{k \to 0} \frac{(\pi-2k)\sin(k)}{k}$$
$$ = \frac{1}{4}\bigg[\lim_{k \to 0} (\pi-2k)*\lim_{k \to 0}\frac{\sin(k)}{k}\bigg]$$
$$=\frac{\pi}{4}$$
I unfortunately only got this after an answer was accepted, as messing around with a limit this much takes a while and involved some trial and error before I could figure out what to do... there might be a way to condense this proof, but I always jump right into these things by making substitution after substitution until I get to a form that I know.
A: $$\lim_{x\to2}\frac{\cos(π/x)}{x-2}$$
Which leads us to an Indeterminate form i.e.,(0/0) form , 
so apply L-Hospital rule ,
$$\lim_{x\to2}[-\sin(π/x)\{-π/x^2\}]
=\lim_{x\to2} \fracπ{x^2}
=\frac{\pi}{4}$$
A: Let $x=2+y$ with $y\ne 0$.We have $x-2=y$ and $ \pi/x=\pi/(2+y)=\pi/2-\pi y/(4+2 y) . $  So $\cos \pi/x=\sin \pi y/(4+2 y)=(1-f(y)(\pi y/(4+2 y)$ where $\lim_{y\to 0} f(y)=0 . $ Hence $(\cos \pi/x)/(2-x)= (1-f(y)(\pi/(4+2 y)).$
A: Let $\dfrac1x=y$ then
\begin{align}
\lim\limits_{x \to 2} \frac{\cos{\left(\frac{\pi}{x}\right)}}{x-2}
&= \lim\limits_{y \to \frac12} \frac{\sin{\left(\frac{\pi}{2}-\pi y\right)}}{\dfrac1y-2}\\
&= \lim\limits_{y \to \frac12} \frac{\sin{\pi\left(\frac{1}{2}- y\right)}}{\pi\left(\frac{1}{2}- y\right)}\dfrac{\left(\frac{1}{2}- y\right)}{1-2y}\pi y\\
&= \color{blue}{\dfrac{\pi}{4}}
\end{align}
