Calculate $\lim_{x\to a}(2-\frac{x}{a} )^{\tan( \frac{\pi x}{2a})}$ 
I would like to calculate 
  $$\lim\limits_{x\to a}\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)},\quad a \in\mathbb{R}^* \,\,\text{fixed} $$

we've 
$$\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)}=e^{\tan\left( \dfrac{\pi x}{2a}\right)\ln\left(2-\dfrac{x}{a} \right)}.$$
Note that:
$$\ln\left(2-\dfrac{x}{a} \right)\sim_{a}1-\dfrac{x}{2}.$$
Now we have $\dfrac{\pi x}{2a}\underset{x\to a}{\longrightarrow} \dfrac{\pi}{2}$, i.e.$\dfrac{\pi x}{2a}-\dfrac{\pi}{2}  \underset{x\to a}{\longrightarrow} 0$ and $\tan h \sim_{0}h.$
I'm stuck.
Update: here is another way :
\begin{aligned}
\left(2-\dfrac{x}{a} \right)^{\tan\left( \dfrac{\pi x}{2a}\right)}&=\exp\left[{\tan\left( \dfrac{\pi x}{2a}\right)\ln\left(2-\dfrac{x}{a} \right)}\right].\\
&=\exp\left[ \left(1-\dfrac{x}{a}\right)\tan\left(\dfrac{\pi x}{2a}-\dfrac{\pi}{2}+\dfrac{\pi}{2} \right).\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{1-\dfrac{x}{a}}\right]\\
&=\exp\left[ -\dfrac{\left(1-\dfrac{x}{a} \right)}{\tan\left(\dfrac{\pi x}{2a}-\dfrac{\pi}{2} \right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
&=\exp\left[ -\dfrac{\left(1-\dfrac{x}{a} \right)}{\tan\left(-\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)\right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
&=\exp\left[ \dfrac{2}{\pi} \dfrac{\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)}{\tan\left(\dfrac{\pi}{2}\left(1-\dfrac{x}{a} \right)\right)}.\dfrac{\ln\left(2-\dfrac{x}{a} \right)}{\left(1-\dfrac{x}{a}\right)}\right]\\
\end{aligned}
Thus 
$$\lim\limits_{x\to a}\left(2-\dfrac{x}{a} \right)^{\tan\left(\dfrac{\pi x}{2a}\right)}  =e^{\dfrac{2}{\pi}} $$


*

*Am i right beside i'm intersted in way which use equivalents

 A: Hint:
$$\left(2-\frac xa\right)^{\tan(\pi x/2a)}=\left[\left(1+\left(1-\frac xa\right)\right)^{1/(1-x/a)}\right]^{(1-x/a)\tan(\pi x/2a)}\\\stackrel{x\to a}\longrightarrow e^{2/\pi}$$
Since,
$$e=\lim_{u\to0}(1+u)^{1/u}$$
$$\frac2\pi=\lim_{u\to1}(1-u)\tan(\pi u/2)$$
for those who want to make this rigorous, use squeeze theorem:
$$\underbrace{\left(2-\frac xa\right)^{\frac2\pi\left(\frac a{a-x}-1\right)}}_{\text{Laurent expansion of }\tan(z)\text{ at }z=\frac\pi2}\le\left(2-\frac xa\right)^{\tan(\pi x/2a)}\le\underbrace{e^{\left(1-\frac xa\right)\tan\left(\frac{\pi x}{2a}\right)}}_{\text{Maclaurin expansion of }e^x}$$
where the inequalities are true for $x<a$ and flipped for $x>a$.
A: We can also apply L'Hopitals directly to $\log\left(2-\frac{x}{a}\right)\tan \frac{\pi x}{2a}$ and then appeal to continuity of $\exp$. In particular we have $$\lim_{x\to a} \frac{\sin \left(\frac{\pi x}{2a}\right) \log\left(2 - \frac{x}{a}\right) }{\cos \left(\frac{\pi x}{2a}\right)} =\lim_{x\rightarrow a} \frac{\frac{\pi}{2a}\cos(\frac{\pi x}{2a})\log(2-\frac{x}{a})-\frac{1}{a}\left(2-\frac{x}{a}\right)^{-1}\sin(\frac{\pi x}{2a})}{-\frac{\pi}{2a}\sin(\frac{\pi x}{2a})} = \frac{-1/a}{-\pi/2a} = \frac{2}{\pi}.$$
Hence the required limit is $\exp(2/ \pi).$
A: $$\lim _{ x\to a } \left( 2-\frac { x }{ a }  \right) ^{ \tan  \left( \frac { \pi x }{ 2a }  \right)  }=\lim _{ x\to a }{ \left[ { \left( 1+\left( 1-\frac { x }{ a }  \right)  \right)  }^{ \frac { a }{ a-x }  } \right]  } ^{ \frac { a-x }{ a } \tan  \left( \frac { \pi x }{ 2a }  \right)  }=\\ ={ e }^{ \lim _{ x\rightarrow a }{ \frac { a-x }{ a } \tan  \left( \frac { \pi x }{ 2a }  \right)  }  }={ e }^{ \lim _{ x\rightarrow a }{ \frac { a-x }{ a\cot { \left( \frac { \pi x }{ 2a }  \right)  }  }  }  }\overset { L'Hospital }{ = } { e }^{ \lim _{ x\rightarrow a }{ \frac { -1 }{ -a\frac { 1 }{ \sin ^{ 2 }{ \left( \frac { \pi x }{ 2a }  \right)  }  } \left( \frac { \pi  }{ 2a }  \right)  }  }  }=\color{blue}{{ e }^{ \frac { 2 }{ \pi  }  }}$$
A: $$A=\left(2-\frac{x}{a} \right)^{\tan( \frac{\pi x}{2a})}\implies \log(A)=\tan( \frac{\pi x}{2a})\log\left(2-\frac{x}{a} \right)$$ Now, using Taylor expansion around $x=a$
$$\log\left(2-\frac{x}{a} \right)=-\frac{x-a}{a}-\frac{(x-a)^2}{2 a^2}+O\left((x-a)^3\right)$$ Using Laurent expansion around $x=a$
$$\tan( \frac{\pi x}{2a})=-\frac{2 a}{\pi  (x-a)}+\frac{\pi  (x-a)}{6 a}+O\left((x-a)^3\right)$$ Combining the product
$$\log(A)=\frac{2}{\pi }+\frac{x-a}{\pi  a}+O\left((x-a)^2\right)$$ Taylor again  $$A=e^{\log(A)}=e^{\frac{2}{\pi }}\left(1+\frac{x-a}{\pi  a}+O\left((x-a)^2\right)\right)$$ which shows the limit and also how it is approached.
A: Set $y=x-a$, then
$$
\lim_{x\to a}\left(2-\frac{x}{a}\right)^{\tan\left(\frac{\pi x}{2a}\right)}=\lim_{y\to0}\left(1-\frac{y}{a}\right)^{-\cot\left(\frac{\pi y}{2a}\right)}=\\=\lim_{y\to0}\exp
\left(-\frac{\log\left(1-\frac{y}{a}\right)}{\tan\left(\frac{\pi y}{2a}\right)}\right)=\lim_{y\to a}\exp{\left(\frac{y}{a}\cdot\frac{2a}{\pi y}\right)}=e^{2/\pi}
$$
