limit of $f(x)=\bigr|{\sin\tfrac{\pi}{2x}}\bigr|^{x}$ or $1$ Let the real-valued function  
$$f(x)=\begin{cases}
\left|{\sin\frac{\pi}{2x}}\right|^{x},& x>0\, \text{ and } x\neq\frac{1}{2n}, \;n\in\mathbb{N}\\
1,&  x=\frac{1}{2n},\; n\in\mathbb{N}\;.
\end{cases}$$  
Find, if it exists, $\displaystyle\mathop{\lim}\limits_{x\rightarrow{0^{+}}}{f(x)}$.
 A: For each $n$, find $x_n \in (\frac{1}{2n}, \frac{1}{n})$ so that $|\sin(\frac{\pi}{2x_n})|^{\frac{1}{2n}} < 1/2$.
This is possible as $\sin(\frac{\pi}{2x})$ has a zero at $\frac{1}{2n}$.
Therefore, $|\sin(\frac{\pi}{2x_n})|^{x_n}  \le |\sin(\frac{\pi}{2x_n})|^{\frac{1}{2n}} < 1/2$.
Since $\lim_{n\to\infty}f(\frac{1}{2n}) = 1$, and
$f(x_n) < 1/2$ for all $n$, 
$\lim_{x\to 0^+} f(x)$ doesn't exist.
A: I beat this limit to arrive at it equaling this
$$\exp\left\{\lim_{x\to\infty} {1\over x}\log\left|\sin\left({\pi\over 2}x\right)\right|\right\}.$$
You can see that this last limit is hopeless.  The $1/x$ factor is not going to damp out the horrendous behavior that occurs because of the zeroes of the sine function.
A: No, the limit does not exist. Let us consider two extreme cases:


*

*When $\frac{\pi}{2x}$ is of the form $n \pi$, then $\sin (\frac{\pi}{2x}) = 0$ so the expression is equal to zero.

*When $\frac{\pi}{2x}$ is of the form $n \pi + \frac{\pi}{2}$, then $\sin (\frac{\pi}{2x})=1$ so the expression is equal to one.
Notice that the function $|\sin (\frac{\pi}{2x})|^x$ is continuous. So even though the function $f(x)$ is defined to be 1 in these two extreme cases, we can get arbitrarily close to 0 in the first case -- that is, by setting $x$ extremely close to but not exactly equal to $\frac{1}{4n}$.
Since we're alternating between 1 and something arbitrarily close to 0, there is no limit as $x$ approaches 0.
