Let $g:\mathbb R \to \mathbb R$ be a function and $a \in \mathbb R$. I would like to compute the limit $$\lim_{x \to a} \left(\sup_{0<t<1} |g(a+t(x-a))-g(a)|\right)$$
I would like to ask: WITHOUT the assumption that $g$ is continuous, is it correct to exchange the $\lim$ and $\sup$ as follows:
$$\lim_{x \to a} \left(\sup_{0<t<1} |g(a+t(x-a))-g(a)|\right) = \sup_{0<t<1} \lim_{x \to a} |g(a+t(x-a))-g(a)|$$
Thank you so much!
Sadly not. For instance, let $a=0$ and let $g(x)=0$ if $x$ is rational and $1$ otherwise. Then the question becomes if \begin{equation} \lim_{x\to 0} \sup_{0<t<1} \vert g(tx)\vert=\sup_{0<t<1}\lim_{x\to 0} \vert g(tx)\vert. \end{equation} But the left side is $1$, as for any $x\neq 0$, there is some number $tx$ that is irrational with $t\in (0,1)$, while the right side is not defined as the inner limit is not defined for any fixed $t\in (0,1)$.