A question from Spivak's Calculus on Manifolds $$
\begin{array}{l}{\text { EXERCISE } 32(2-2) . \text { A function } f: \mathbb{R}^{2} \rightarrow \mathbb{R} \text { is independent of the second vari- }} \\ {\text { able if for each } x \in \mathbb{R} \text { we have } f\left(x, y_{1}\right)=f\left(x, y_{2}\right) \text { for all } y_{1}, y_{2} \in \mathbb{R} . \text { Show that } f} \\ {\text { is independent of the second variable if and only if there is a function } g: \mathbb{R} \rightarrow \mathbb{R}} \\ {\text { such that } f(x, y)=g(x) . \text { What is } f^{\prime}(a, b) \text { in terms of } g^{\prime} ?}\end{array}
$$
My question is short: What is the ''independent'' mean in the question? Thanks...
 A: There's a "technical" way of describing independence, which is actually in the first sentence of your question. In plain English, I'd say that "independent" means something like "doesn't depend" on it.
So here, $f$ being independent just means that it doesn't depend on the second variable. To understand the first sentence, try thinking about what it means for $f(1, 5) = f(1, -10) = f(1, \pi) = f(1, \text{any }y\text{ value})$.
A: Since $f$ maps $\mathbb R^2$ to $\mathbb R$, you can actually see how this works very easily by drawing a possible graph. Here is an example:

If you fix $x$ and move $y$ around, the value of $f$ does not change. And this is just what the definition in your question means. Can you guess what the formula for the function whose graph is depicted above is?
To make this rigorous, suppose $f$ is independent of the second variable. Define $g(x)=f(x,y).$ We need to show that this is well-defined. That is, if $y_1\neq y_2$, then $f(x,y_1)=f(x,y_2).$ But this is exactly what the definition says! So $g$ is well-defined. On the other hand, if there is a $g:\mathbb R\to \mathbb R$ such that $g(x)=f(x,y)$ for any $(x,y)\in \mathbb R^2$, then if $y_1,y_2\in \mathbb R,\ f(x,y_1)=g(x)=f(x,y_2)$  so $f$ satisfies the defintion of independence in the second variable. 
Now, if $f'(a,b)$  exists, and $f$ is independent of the second variable, then the Jacobian matrix of $f$ is $\mathcal Jf(a,b)=\begin{pmatrix}
\frac{\partial f}{\partial x}(a,b) & \frac{\partial f}{\partial y}(a,b)
\end{pmatrix}=\begin{pmatrix}
\frac{\partial f}{\partial x}(a,b) & 0
\end{pmatrix}$ whereas $g'(a)=\frac{dg}{dx}(a).$
You can check that $\frac{\partial f}{\partial x}(a,b)=\frac{dg}{dx}(a):$
$\frac{\partial f}{\partial x}(a,b)=\underset{t\to 0}\lim\frac{f((a,b))+t(1,0))-f(a,b)}{t}=\underset{t\to 0}\lim\frac{g(a+t)-g(a)}{t})=\frac{dg}{dx}(a).$
