Limit of a Function involving tangent function and limits at infinity 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.
 A: 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$$
A: Hint:
With $t:=1/x\to0$,
$$\left(\tan\frac\pi{2+t}\right)^t=\left(\tan\left(\frac\pi2-\frac\pi {2+t}\right)\right)^{-t}=\left(\tan\frac{\pi t}{2(2+t)}\right)^{-t}$$
is asymptotic to $(\frac\pi4t)^{-t}$ and tends to $1$.
A: I would rather use asymptotic expansions.
$$y=\lim_{x\to\infty}\left(\tan\frac{\pi x}{2x+1}\right)^{1/x}$$
As $x\to\infty$,
$\frac{\pi x}{2x+1}\approx \pi/2$
For $h$ near to $\pi/2$,
$$\sin(h)\approx 1$$
$$\cos(h)\approx \pi/2-h$$
$$\tan(h)\approx \frac1{\pi/2-h}$$
Thus,
$$\tan( \frac{\pi x}{2x+1})\approx \frac1{\pi/2-\frac{\pi x}{2x+1}}=\frac2\pi(2x+1)$$
$$\ln y\approx \frac{\ln \frac2\pi(2x+1)}x\to 0$$
So, $y=1$.
A: $$L =\lim_{x \to \infty}\left(\tan{\frac{\pi x}{2x+1}}\right)^\frac{1}{x}$$
$$\lim_{x \to \infty}g(x) = \lim_{x \to \infty}\left(\tan{\frac{\pi x}{2x+1}}\right) = \lim_{x \to \infty}\left(\frac{2 + 4 x}{\pi}\right)\tag{1}$$
So
$$L = e^{\left(\lim_{x \to \infty}\frac{1}{x}\ln(g(x))\right)}$$
$$\lim_{x \to \infty}\left(\frac{\ln\left(\frac{2 + 4 x}{\pi}\right)}{x}\right) \stackrel{I´H}{\implies} \lim_{x \to \infty}\left(\frac{2}{2x + 1}\right) = 0$$
Therefore
$$L = e^0 = 1$$


(1) Proof :
For $x \to\infty$
$$g(x) = \tan\left(\frac{\pi x}{2x+1}\right) =\tan\left(\frac{\pi}{2}\frac{1 }{\left(1+\frac{1}{2x}\right)}\right) =\tan\left(\frac{\pi}{2}\frac{1 }{\left(1+\frac{1}{2x}\right) } - \frac{\pi}{2} + \frac{\pi}{2}\right)$$
$$\tan\left(\frac{\pi}{2}\left(\frac{1 }{\left(1+\frac{1}{2x}\right) } - 1\right) + \frac{\pi}{2}\right) = \tan\left(\frac{\pi}{2}- \frac{\pi}{2}\left(\frac{1}{2x+1 }\right)\right)$$
Set $\frac{1}{\left(2x+1\right) } = t$, observe that, as $t \to 0$
$$
\begin{align}
\tan\left(\frac{\pi}{2} - \frac{\pi}{2}t\right) 
= \tan\left(\frac{\pi}{2}(1-t)\right) = \cot\left(\frac{\pi}{2}t\right) = \frac{\cos(\pi t) +1 }{\sin(\pi t)}=\\
\end{align}$$
$$\frac{\pi t}{\pi t}\cdot\frac{\cos(\pi t) +1 }{\sin(\pi t)}=$$
$$\frac{1}{t\pi}\cdot\underbrace{\left(\frac{\pi t }{\sin(\pi t)}\left(\cos(\pi t) +1\right)\right)}_{t \to 0 \implies 2}=
\frac{1}{t\pi}\cdot 2 = $$
$$\frac{1}{\left(\frac{1}{\left(2x+1\right)}\right)\pi}\cdot 2 =
\frac{(2 + 4 x)}{\pi}\tag*{$\Box$}$$
