Calculate the limit : $\lim_{x\rightarrow \infty}\tan ({\frac{\pi x}{2x+1}})^\frac{1}{x}$ Exercise :

Calculate the following limit
  $$\lim_{x\rightarrow \infty}\tan \bigg({\frac{\pi x}{2x+1}}\bigg)^\frac{1}{x}$$

Attempt :
$$\lim_{x\rightarrow \infty} \frac{1}{x} = \frac {1}{\infty} = 0$$
$$\lim_{x\rightarrow \infty}\tan ({\frac{\pi x}{2x+1}})^\frac{1}{x}=\lim_{x\rightarrow \infty}\tan ({\frac{\pi x}{2x+1}})^0 = 1$$
Is  it correct ?
 A: As an alternative
$$\frac{\pi x}{2x+1}=\frac{\frac{\pi}2 (2x+1)-\frac{\pi}2}{2x+1}=\frac{\pi}2-\frac{\pi}{4x+2}$$
then
$$\left[\tan \bigg({\frac{\pi x}{2x+1}}\bigg)\right]^\frac{1}{x}=\left[\cot \bigg(\frac{\pi}{4x+2}\bigg)\right]^\frac{1}{x}=\frac{1}{\left[\tan \bigg(\frac{\pi}{4x+2}\bigg)\right]^\frac{1}{x}} \to 1$$
indeed
$$\left[\tan \bigg(\frac{\pi}{4x+2}\bigg)\right]^\frac{1}{x}=\left[\frac{\tan \bigg(\frac{\pi}{4x+2}\bigg)}{\frac{\pi}{4x+2}}\right]^\frac{1}{x}\left(\frac{\pi}{4x+2}\right)^\frac1x\to 1^0\cdot 1=1$$
indeed
$$\left(\frac{\pi}{4x+2}\right)^\frac1x=e^{\frac{\log \left(\frac{\pi}{4x+2}\right)}{x}}=e^{\frac{\log \left(\frac{\pi}{4x+2}\right)}{\frac{\pi}{4x+2}}\cdot\frac{\pi}{x(4x+2)}}\to e^0=1$$
A: Write
$$
\frac{\pi}{2}-t=\frac{\pi x}{2x+1}
$$
When $x\to\infty$, we have $t\to0^+$ and also
$$
t=\frac{\pi}{2}-\frac{\pi x}{2x+1}=\frac{\pi}{2(2x+1)}
$$
whence
$$
x=\frac{\pi-2t}{4t}
$$
The limit of the logarithm is thus
$$
\lim_{t\to0^+}\frac{4t}{\pi-2t}\log\tan t=0
$$
and so your limit is $e^0=1$.
Just verify that
$$
\lim_{t\to0^+}t\log\tan t=0
$$
which you should be able to.
