if $f:\mathbb{R^2} \to\mathbb{R}$ and $\frac{\partial f}{\partial y}=0$ for all $(x,y)\in \mathbb{R^2}$
show that $f$ is independent of second variable.
if $\frac{\partial f}{\partial x}= \frac{\partial f}{\partial y}=0$ for all $(x,y) \in\mathbb{R^2}$. then $f$ is constant.
how can we approach this problem. i think we need to show $f(x,y_1)=f(x,y_2)$ for all $y_1,y_2 \in\mathbb{R}$ for the first part. but how to do that ?? any hint
Use the fundamental theorem of calculus (Link).
First define $g_x(y) = f(x,y)$ by assumption $g_x'(y)=0$. Applying the fundamental theorem we have that $g_x(y)-g_x(0) = \int_{0}^y g_x'(y)dy = \int_0^y 0 dy =0$ It follows that $g_x(y)=g_x(0)$ thus $f(x,y)=f(x,0)$ for every $x,y$. In other words $f$ is independent of $y$.