I'm trying to understand the provided solution yet something doesnt seem right, I'll share the problem, my solution (Which is incorrect according to my lecturer), and the lecturer's solution.
The problem:
Let $f:\mathbb{R}^2\rightarrow\mathbb{R}$ be a differentiable function.
And it's given that: $\nabla f(2,3)=(3,4)$
Let $g:\mathbb{R}^2\rightarrow\mathbb{R}$ be defined such that $g(x,y)=f(x^2-y+2,y^3-x+3)$
And the goal is to find $g_x(1,1)$
I've asked a question about this before in a different manner, to understand that $g_x(x,y)=f_x(x^2-y+2,y^3-x+3)$
So my immediate solution was to claim $g_x(1,1)=f_x(1^2-1+2,1^3-1+3)=f_x(2,3)=3$ (which is incorrect).
The solution the lecturer provided was to define $u(x)=x^2-y+2,v(x)=y^3-x+3$ and then claiming that by the chain rule: $g_x(1,1)=f_u(2,3)\cdot u_x(2,3)+f_v(2,3)\cdot v_x(1,1)$
Which he proceeded by finding the partial derivatives of $u,v$ according to $x$ and placing them in the equation to find $g_x(1,1)$
I cant seem to understand why my solution was incorrect, furthermor, I cant understand why my lecturer decided to define $u,v$ and go through the process I shared on this post.
Any explanation (preferably as intuitive as possible) would help me better my understanding.
Thanks in advance!
The issue lies with the meaning of the $x$ subscript in $g_x(x,y)$ and $f_x(x^2−y+2,y^3−x+3)$.
You begin by wanting it to mean the partial derivative with respect to $x$:
$$g_x(x,y)=\dfrac{\partial g(x,y)}{\partial x}$$
However, when claiming $f_x(2,3)=3$, you are treating it as the partial derivative with respect to the first argument of the function.
These are not interchangable.
Your professor correctly uses the Chain Rule, by consistently using the subscripts to refer to derivatives with respect to the first argument of the function.
$${g_x(x,y)=f_u(u(x,y),v(x,y))\cdot u_x(x,y)+f_v(u(x,y),v(x,y))\cdot v_x(x,y)\\g_x(1,1)~{=f_u(u(1,1),v(1,1))\cdot u_x(1,1)+f_v(u(1,1),v(1,1))\cdot v_x(1,1)\\=f_u(2,3)\cdot u_x(1,1)+f_v(2,3)\cdot v_x(1,1)\\=3u_x(1,1)+4v_x(1,1)}}$$