Given $f$ is continuous and $f(x)=f(e^{t}x)$ for all $x\in\mathbb{R}$ and $t\ge0$, show that $f$ is constant function This question was asked in ISI BStat / BMath 2018 entrance exam:

Let $f: \mathbb{R} \to \mathbb{R}$ be a continuous function such that
  for all $x\in\mathbb{R}$ and $t\ge 0$, $$f(x)=f(e^{t}x)$$ Show that
  $f$ is a constant function.


My attempt:
Suppose that $f$ is not a constant function. Then $f(0)\ne f(x_0)$ for some $x_0 \in \mathbb{R}$. We eliminate the possibilities that $x_0>0$ and $x_0<0$, thus proving that our assumption was wrong.
Case 1: ($x_0>0$). Let $k$ be any real number between $f(0)$ and $f(x_0)$ (not inclusive). Then by the intermediate value theorem,  there exists $y_0 \in (0, x_0)$ such that $f(y_0)=k$. But $f(y_0)=f\left( e^{\ln \left( \frac{x_0}{y_0}\right)  } y_0\right) = f(x_0)$ which contradicts our assumption that $f(y_0)$ was between  $f(0)$ and $f(x_0)$.
Case 2: ($x_0<0$). Let $k$ be any real number between $f(0)$ and $f(x_0)$ (not inclusive). Then by the intermediate value theorem,  there exists $y_0 \in (x_0, 0)$ such that $f(y_0)=k$. But $f(x_0)=f\left( e^{\ln \left( \frac{y_0}{x_0}\right)  } x_0\right) = f(y_0)$, a contradiction again.

Is this proof correct? I was probably looking for a direct proof if there's any. Alternative proofs are welcome.
 A: An alternative proof: put $x=e^{-t}$ to get $f(e^{-t})=f(1)$ for all $t \geq 0$. This im plies $f(x)=f(1)$ for all $x \in (0,1]$. Next note that $f(x)=f(2x)$ for all $x$: just take $t=\ln (2)$). You now see easily that $f(x)=f(1)$ for all $x >0$. Since $f(-x)$ satisfies the same hypothesis it follows that $f$ is a constant on $(-\infty, 0)$ also. By continuity the constant values for $x <0$ and $x >0$ must be the same. 
A: Your argument is correct. Also, following from what you did, I came up with the following constructive argument. Do check if it is right - 
First, consider $y>x>0$, and let $t = \ln(\frac{y}{x})$ i.e. $e^t = \frac{y}{x}$.
Then, $f(x) = f(e^tx) = f(y)$.
As this holds for all $y>x>0$, we must have $f(x) = C_+$ for $x>0$
Similarly, for $y<x<0$, let $t = \ln(\frac{|y|}{|x|})$.
Then again, $f(x) = f(e^tx) = f(\frac{|y|}{|x|}x) = f(y)$.
As this holds for all $y<x<0$, we must have $f(x) = C_-$ for $x<0$
Thus, all we need to do now is to check at $x=0$. At this point, we will use continuity.
As $f(x)$ is continuous everywhere in $\mathbb{R}$, it is continuous at $x=0$. So, we have $\lim_{x\to 0^+} f(x) = \lim_{x\to 0^-} f(x) = f(0)$.
Hence, we get $C_+ = C_- = f(0)$ i.e. $f(x)$ is a constant function.
A: We know using continuity of $e^t$


*

*$x> 0 \Rightarrow xe^t: [0,+\infty) \stackrel{t \mapsto xe^t}{\longrightarrow}[x,+\infty) \Rightarrow \forall y\geq x: f(x) = f(y) $

*$x< 0 \Rightarrow xe^t: [0,+\infty) \stackrel{t \mapsto xe^t}{\longrightarrow}(-\infty, x] \Rightarrow \forall y\leq  x: f(x) = f(y)$
So, $f(x) = c_1 = f(-1)$ on $(-\infty, 0)$ and $f(x) = c_2 = f(1)$ on $(0, +\infty)$.
Since $f$ is continuous at $0$, we have $c_1= \lim_{x\to 0^-}f(x)=f(0) = \lim_{x\to 0^+}f(x) = c_2$. So, $f$ is constant everywhere.
