I Have Trouble with Using Chain Rule to Find Gradient Based on Two Given Multivariable Functions I'm taking multivariable calculus, and I'm stuck on this problem that wants me to find $\nabla f(x,y)$ at the points (x,y)=(1,0) and (x,y)=(-1,0). The two equations I'm given are $f(x,0)=x^3+3x$ for all x (eq. 1), and $f(x,1-x^2)=x^4-x^2+4x$ for all x (eq. 2). The solution uses the multivariable chain rule (we haven't covered matrices yet) to get $\nabla f(1,0)=(6,0)$ and $\nabla f(-1,0)=(6,-2)$. I'm already familier with the chain rule, parametric equations, and partial derivatives, but I'm confused with the reasoning behind using $f_x(1,0)$ and $f_x(-1,0)$ derived from eq. 1 rather than use these partial derivatives from eq. 2. To my knowledge, if I plug in $x=1$ and $x=-1$ into eq. 2, I get $f(1,0)$ and $f(-1,0)$ respectively, which from there I can compute $f_x(1,0)$ and $f_x(-1,0)$ to get $4(1)^3-2(1)+4=6$ and $4(-1)^3-2(-1)+4=2$ respectively. The $f_x(1,0)$ value is the same as eq. 1, but eq. 1's $f_x(-1,0)$ value is 6, which is different from eq. 2's $f_x$ value (2). I have no problem with the rest of the solution, as I can find $f_y$ by plugging in the other values into the chain rule formula to ultimately find $\nabla f(x,y)$. Am I simply misunderstanding a concept here? I obviously know that I can't directly find $f_y$ from either equation by itself, but I thought that if I can find $f_x$ for eq. 1, I could also find it for eq. 2? This is my first ever question on this forum, and I would really appreciate any help! p.s. I don't know matrices yet.
 A: $f$ is a function defined on the $(x,y)$ plane and going into $\Bbb R$. You do not know what that function is. What you do know is there are a couple curves
$$\begin{align}\alpha(t) &= (x_\alpha(t), y_\alpha(t)) = (t, 0)\\\beta(t) &=  (x_\beta(t), y_\beta(t)) =(t,1-t^2)\end{align}$$
and you are given the values of $f$ along those curves:
$$f\circ\alpha(t) = t^3 + 3t\tag{1}$$$$f\circ\beta(t) = t^4 - t^2 + 4t\tag 2$$
These two curves happen to agree at two points: $$\alpha(-1) = \beta(-1) = (-1,0)\\\alpha(1) = \beta(1) = (1,0)$$
and the problem is to find the gradient of $f$ at those two intersections. Fortunately, the tangent vectors to $\alpha$ and $\beta$ at these points are not parallel to each other. If they were, the problem would be unsolvable.
By the chain rule, we know that $$(f\circ\alpha)'(t) = f_x(\alpha(t))x_\alpha'(t) + f_y(\alpha(t))y_\alpha'(t) = 3t^2 + 3$$
Since $x_\alpha'(t) = 1, y_\alpha'(t) = 0$, this tells us
$$f_x(\alpha(t)) = 3t^2 + 3$$
In particular $f_x(1,0) = 6, f_x(-1,0) = 6$. It tells us nothing about $f_y$.
Again by the chain rule
$$(f\circ\beta)'(t) = f_x(\beta(t))x_\beta'(t) + f_y(\beta(t))y_\beta'(t) = 4t^3 -2t + 4$$
Now $x_\beta'(t) = 1, y_\beta'(t) = -2t$
So $$f_x(\beta(t)) - 2tf_y(\beta(t)) = 4t^3 -2t + 4$$
For our two points of interest,
$$f_x(1,0) - 2f_y(1,0) = 6\\f_x(-1,0) + 2f_y(-1,0) = 2$$
But we already know what $f_x(1,0)$ and $f_x(-1,0)$ are. So
$$6 - 2f_y(1,0) = 6\\6 + 2f_y(-1,0) = 2$$
And thus
$$f_y(1,0) = 0\\f_y(-1,0) = -2$$
The key point to your questions is that $f(x,y), f_x(x,y), f_y(x,y)$ are functions of $(x,y)$, not $t$ (which is why I chose a different letter $t$ for the parameter, even though $x = t$ on both curves). These three functions are functions of the point, not the parameter of some curve passing through that point. Thus the $f_x(1,0)$ and $f_x(-1,0)$ determined from equation $(1)$ are the same $f_x(1,0)$ and $f_x(-1,0)$ in the calculations coming from equation $(2)$.
