I faced this question in an interview yesterday.
QUESTION: We have a function $f$ depending on three variables $x_1,x_2,x_3$. Now the gradient of $f$ is perpendicular at any point $(x_1,x_2,x_3)$, or in mathematical language , $$\vec r \cdot \nabla f =0$$ Now what can be said about $f$ from this information?
I could not make out anything from this. And I failed to proceed since I did not know the relation between $x_1,x_2,x_3$. I was given the hint that I should consider the function $f(t\vec r)$ where $t$ is a scalar and differentiate it with respect to $t$. I calculated it as: $$\frac{d}{dt}\left[f(t\vec r)\right]=f'(t\vec r) \vec r$$
I was still unable to make any interpretation. I was asked what the $f'$ thing meant. I said that it was a derivative but he asked me what it signified. But I had no clue.
Can anybody help me?
P.S. You can take $\vec r=(x_1,x_2,x_3)$. The interviewer said nothing about this. So I think it will be that way only.

Your calculations are wrong. It should read as
$$\frac d{dt} f(tx_1, tx_2, tx_3) = \frac{ \partial f}{\partial x_1} \frac { \partial (tx_1)}{\partial t} + \frac{ \partial f}{\partial x_2} \frac { \partial (tx_2)}{\partial t} + \frac{ \partial f}{\partial x_3} \frac { \partial (tx_3)}{\partial t} = \nabla f \cdot \vec r = 0$$
that is, if you fix a direction (fix $x_1, x_2, x_3$) your function is constant along that direction.
Hence, your function only depends on the angle (or the direction) of the point, not on the distance. That is
$$f(\vec r) = f(\vec r/a)$$
for every $a > 0$
Note that in general this is not constant.
It is constant if it is continuous at the origin: in this case, for every point $(x_1, x_2, x_3)$ you can "go back" along the line connecting this point to $0$ (without changing value); and if $f$ is continuous at $0$, then it must be that $f(x_1, x_2, x_3) = f(0,0,0)$ for any $(x_1, x_2, x_3)$.
On the other hand if $f$ is not continuous (or not defined) in $0$, then you will have some sort of "sphere" that generates all the values of the function, and they can be different