How to solve $\lim_{x\rightarrow a} (2-\frac{x}{a})^{\tan (\frac{\pi x}{2a})}$ Can someone help me to calculate the following limit?
$$\lim_{x\to a} \Big(2-\frac{x}{a}\Big)^{\tan\dfrac{\pi x}{2a}}$$
Thank you.
 A: Say $2-\dfrac{x}{a}=1+\dfrac{1}{y}$ then $y=\dfrac{a}{a-x}$ and $y\to\infty$ as $x\to a$. With this substitution we have
$$\tan(\frac{\pi x}{2a})=\cot(\frac{\pi}{2}-\frac{\pi x}{2a})=\cot(\frac{\pi}{2}-\frac{\pi x}{2a})=\cot\frac{\pi}{2y}$$
so
$$\lim_{x\to a} (2-\frac{x}{a})^{\tan (\frac{\pi x}{2a})}=\lim_{y\to\infty}\Big[(1+\dfrac{1}{y})^y\Big]^{\frac1y\cot\frac{\pi}{2y}}$$
But
$$\lim_{y\to\infty}\frac1y\cot\frac{\pi}{2y}=\lim_{t\to0}\frac{t}{\tan\frac{\pi t}{2}}=\frac{2}{\pi}$$
Thus thee limit is $\color{red}{e^\frac{2}{\pi}}$.
A: Consider $\lim_{x\rightarrow a} e^{\ln((2-\frac{x}{a})^{\tan (\frac{\pi x}{2a})})}=\lim_{x\rightarrow a} e^{\tan(\frac{\pi x}{2a})\ln(2-\frac{x}{a})}$.
Clearly it suffices to calculate the limit $$\lim_{x\rightarrow a} {\tan(\frac{\pi x}{2a})\ln(2-\frac{x}{a})}.$$
We can do this by using L'Hopitals rule.
\begin{eqnarray}
\lim_{x\rightarrow a} {\tan(\frac{\pi x}{2a})\ln(2-\frac{x}{a})} 
&=& \lim_{x\rightarrow a} \frac{\sin(\frac{\pi x}{2a})\ln(2-\frac{x}{a})}{\cos(\frac{\pi x}{2a})}\\
& \overset{\mathrm{H}}{=}& \lim_{x\rightarrow a} \frac{\frac{\pi}{2a}\cos(\frac{\pi x}{2a})\ln(2-\frac{x}{a})-\frac{1}{a}\frac{1}{2-\frac{x}{a}}\sin(\frac{\pi x}{2a})}{-\frac{\pi}{2a}\sin(\frac{\pi x}{2a})}\\
&=& \frac{2}{\pi}.
\end{eqnarray}
Hence the desired limit is $e^{\frac{2}{\pi}}$.
