How do I prove that f does not depend on y? Thats maybe a stupid question, it is really trivial, but I asked me how one could really show this.

If $f:\mathbb{R}^2\rightarrow \mathbb{R}$ is a differentiable function and $\frac{\partial f}{\partial y}=0$ then f does not depend on y.

I mean it is clear, but how can we show this, because when I use contradiction and the definition of the partial derivative I somhow get stuck at $$\frac{\partial f}{\partial y}(x,y)=\lim_{h\rightarrow 0} \frac{f((x,y+h))-f(x,y)}{h}$$
Thank you for your help.
 A: Let's start with the single variable case and then it'll be clear how it applies to multiple variables. The mean value theorem states that if we have a function $f(x)$ that is continuous on an interval $[a,b]$ and differentiable on $(a,b)$, then there is some $c\in (a,b)$ where $$f'(c) = \frac{f(b)-f(a)}{b-a},$$ which essentially means that the "average slope" of a function over an interval must be equal to the instantaneous slope at one point in that interval.
Let's assume that $f\colon [a,b] \to \mathbb{R}$ is a continuous function on $[a,b]$ and differentiable on $(a,b)$ with $f'(x) = 0$ for all $x\in (a,b)$. Striving for contradiction, assume $f(x_1) \ne f(x_2)$, for some $x_1,x_2 \in [a,b]$, i.e. that $f$ is nonconstant. Indeed, then we have $$\frac{f(x_2)-f(x_1)}{x_2-x_1}\ne 0$$ which means that for some $c \in (x_0, x_1)\ne \varnothing$ we have $f'(c) \ne 0$, which contradicts our assumption that $f'(x)$ was identically zero on $(a,b)$.
Generalizing to the multivariable setting, let $f\colon \mathbb{R}^2 \to \mathbb{R}$ be differentiable (and thus continuous on $\mathbb{R}^2$) such that $\frac{\partial f}{\partial y} = 0$. Then, we'll assume that $f$ depends on $y$, i.e. that $f(x, y_1)\ne f(x,y_2)$ for some $y_1\ne y_2$ and strive for contradiction. If we define $g\colon \mathbb{R}\to \mathbb{R},\ g(t) := f(x,t)$, then $g'(t) = 0$ for all $t$ by our assumption. However, $g(y_1) \ne g(y_2)$, so we can apply the above result to this now single variable function and obtain a contradiction.
