Determine $$\lim_{x \to \infty}\left(\tan{\frac{\pi x}{2x+1}}\right)^\frac{1}{x}$$.
Attempt
Let $$y=\left(\tan{\frac{\pi x}{2x+1}}\right)^\frac{1}{x}$$
Put $\frac{1}{x}=p$.
$$\lim_{p \to 0}\left(\tan{\frac{\pi}{2+p}}\right)^p$$.
We have $$\lim_{x \to \infty} y=\lim_{p \to 0}\left(\tan{\frac{\pi}{2+p}}\right)^p$$.
Now consider the function $y$ in variable $p$ Taking $ln$ both sides $$ln\left(y\right)=p.ln\left(\tan{\frac{\pi}{2+p}}\right)$$. $$ln\left(y\right)=p.\frac{ln\left(\tan{\frac{\pi}{2+p}}\right)}{\tan{\frac{\pi}{2+p}}}.\tan{\frac{\pi}{2+p}}$$.
Putting $\tan{\frac{\pi}{2+p}}=m$
We have
$$ln\left(y\right)=p.\frac{ln\left(m\right)}{m}.\tan{\frac{\pi}{2+p}}$$.
As $x \to \infty$ we have $p \to 0$ and hence $m \to \infty$
Hence the limit of $\frac{ln\left(m\right)}{m}$ is $0$.
But I am unable to show the limit of other to part of the product. Please help me out.
Note that
$$\left(\tan{\frac{\pi x}{2x+1}}\right)^\frac{1}{x}=\left(\tan{\frac{\pi x+\frac{\pi}2-\frac{\pi}2}{2x+1}}\right)^\frac{1}{x}=\left(\tan{\left(\frac{\pi}2-\frac{\frac{\pi}2}{2x+1}\right)}\right)^\frac{1}{x}=\left(\tan{\frac{\pi}{4x+2}}\right)^{-\frac{1}{x}}=e^{-\frac{\log{\left(\tan{\frac{\pi}{4x+2}}\right)}}{x}}\to 1$$
Indeed
$$-\frac{\log{\left(\tan{\frac{\pi}{4x+2}}\right)}}{x}=-\left(\tan{\frac{\pi}{4x+2}}\right)\log{\left(\tan{\frac{\pi}{4x+2}}\right)}\frac{\frac{\pi}{4x+2}}{\tan{\frac{\pi}{4x+2}}}\frac{\frac{4x+2}{\pi}}{x}\to0\cdot1\cdot \frac4 \pi=0$$
As an alternative, according to the change of variable $p=\frac 1 x \to 0$, from here
$$\left(\tan{\frac{\pi}{2+p}}\right)^p=e^{p\log \left(\tan{\frac{\pi}{2+p}}\right)}\to 1$$
indeed
$$p\log \left(\tan{\frac{\pi}{2+p}}\right)=p\tan{\frac{\pi}{2+p}}\frac{\log \left(\tan{\frac{\pi}{2+p}}\right)}{\tan{\frac{\pi}{2+p}}}\to 0$$
indeed
$$\frac{\log \left(\tan{\frac{\pi}{2+p}}\right)}{\tan{\frac{\pi}{2+p}}}\to 0$$ $$p\tan{\frac{\pi}{2+p}}=\frac{p}{\tan\left({\frac{\pi}2-\frac{\pi}{2+p}}\right)}=\frac{p}{\tan\left({\frac{\pi p}{2p+4}}\right)}=\frac{\frac{\pi p}{2p+4}}{\tan\left({\frac{\pi p}{2p+4}}\right)}\frac{2p+4}{\pi}\to \frac 4 \pi$$