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.
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$