Evaluate the limit $\lim_{x\to a} (a-x) \tan \frac {\pi x}{2a}$ 
Evaluate:
  $$\lim_{x\to a} (a-x) \tan \dfrac {\pi x}{2a}.$$

My attempts:
$$=\lim_{x\to a} (a-x) \dfrac {\sin \left(\dfrac {\pi x}{2a}\right)}{\cos \left(\dfrac {\pi x}{2a}\right)}=1\cdot\lim_{x\to a} \dfrac {a-x}{\cos \left(\dfrac {\pi x}{2a}\right)}.$$

Let $y = \frac{\pi x}{2a}$
\begin{align} \lim_{x \to a} \frac{a-x}{\cos \left( \frac{\pi x}{2a}\right)} &= \lim_{y \to \frac{\pi}{2}} \frac{\pi a-(2ay)}{\pi \cos(y)}\\
&=\frac{2a}{\pi} \lim_{y \to \frac{\pi}{2}} \frac{\frac{\pi}2-y}{\cos(y)}\\
&=\frac{2a}{\pi} \lim_{y \to \frac{\pi}{2}} \frac{\frac{\pi}2-y}{\cos\left(y-\frac{\pi}{2} + \frac{\pi}{2}\right)}\\
&= \frac{2a}{\pi} \lim_{y \to \frac{\pi}{2}} \frac{y-\frac{\pi}2}{\sin\left(y-\frac{\pi}{2} \right)}\\
&=\frac{2a}{\pi}\end{align}
