Here is Prob. 20, Exercises 8.9, in the book Calculus Vol II by Tom M. Apostol, 2nd edition:
(a) Assume that $f^\prime ( \mathbf{x}; \mathbf{y} ) = 0$ for every $\mathbf{x}$ in some $n$-ball $B(\mathbf{a})$ and for every vector $\mathbf{y}$. Use the mean-value theorem to prove that $f$ is constant on $B(\mathbf{a})$.
(b) Suppose that $f^\prime ( \mathbf{x}; \mathbf{y} ) = 0$ for a fixed vector $\mathbf{y}$ and for every $\mathbf{x}$ in $B(\mathbf{a})$. What can you conclude about $f$ in this case?
And, here is Theorem 8.4 (The Mean-Value Theorem For Derivatives Of Scalar Fields):
Assume the derivative $f^\prime ( \mathbf{a} + t \mathbf{y}; \mathbf{y} )$ exists for each $t$ in the interval $0 \leq t \leq 1$. Then for some real $\theta$ in the open interval $0 < \theta < 1$ we have $$ f ( \mathbf{a} + \mathbf{y} ) - f( \mathbf{a} ) = f^\prime ( \mathbf{z}; \mathbf{y} ), \ \mbox{ where } \ \mathbf{z} = \mathbf{a} + \theta \mathbf{y}. $$
My Attempt:
Part (a)
Let $\mathbf{x}$ be any point in the $n$-ball $B( \mathbf{a} )$. Let us put $$\mathbf{y} \colon= \mathbf{x} - \mathbf{a}$$ so that $$\mathbf{x} = \mathbf{a} + \mathbf{y}. $$ Then, for any real number $\theta$ in the interval $0 \leq \theta \leq 1$, we find that the point $ \mathbf{a} + \theta \mathbf{y} $ also lies in the $n$-ball $B( \mathbf{a} )$, and so we must have $$ f^\prime ( \mathbf{a} + \theta \mathbf{y} ; \mathbf{y} ) = 0. $$ Then, for some real number $\theta$ such that $0 < \theta < 1$, we obtain $$ f(\mathbf{x}) - f(\mathbf{a}) = f(\mathbf{a} + \mathbf{y} ) - f( \mathbf{a}) = f^\prime ( \mathbf{a} + \theta \mathbf{y}; \mathbf{y} ) = 0, $$ and so $$ f(\mathbf{x}) = f(\mathbf{a}) $$ for every point $\mathbf{x}$ in that $n$-ball. Hence $f$ is constant on the $n$-ball.
Is this proof correct? And if so, then is it clear enough too?
Part (b)
Since $f^\prime ( \mathbf{x}; \mathbf{y} ) = 0$ for a fixed vector $\mathbf{y}$ and for every $\mathbf{x}$ in $B( \mathbf{a} )$, therefore if $t$ is a real number such that the point $\mathbf{a} + t \mathbf{y}$ is also in $B( \mathbf{a} )$, then we see that, for some real number $\theta \in (0, 1)$, we have
$$ f( \mathbf{a} + t \mathbf{y} ) - f( \mathbf{a} ) = f^\prime ( \mathbf{a} + \theta t \mathbf{y}; t \mathbf{y} ) = f^\prime ( \mathbf{a} + \theta t \mathbf{y}; \mathbf{y} ) = 0, $$ and so $$ f( \mathbf{a} + t \mathbf{y} ) = f( \mathbf{a} ), $$ which shows that $f$ does not change along any line through the point $\mathbf{a}$ and parallel to the vector $\mathbf{y}$.
Is each and everything of what I have done (and stated) in Part (b) correct? Or, have I made an error?
P.S.:
Part (b) Continued:
Now let $\mathbf{x}$ be any other point in $B(\mathbf{a})$. Then using the same argument as above but with $\mathbf{a}$ replaced by $\mathbf{x}$ we can conclude that our scalar field $f$ doesn't change throughout $B(\mathbf{a})$ along any line parallel to the vector $\mathbf{y}$.
Am I right? Is my reasoning correct?
Your proof of part (a) is fine, but part (b) is not the general correct result. You should be able, with a slight modification, to show that $f$ does not change along any line segment in the ball with direction vector $\mathbf y$.