Trying to understand a solution to a problem regarding chain rule and partial derivatives

89 Views Asked by At

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!

2

There are 2 best solutions below

1
On BEST ANSWER

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)}}$$

0
On

If $g(x,y)=f(x^2-y+2,y^3-x+3)$, then:

$$g(x+h,y)=f((x+h)^2-y+2,y^3-(x+h)+3)$$ $$=f(x^2 + 2hx + h^2 - y + 2, y^3 - x - h + 3)$$

Plug in $x=1$ and $y=1$.

$$g(1+h,1)=f(2 + 2h + h^2, 3 - h)$$

Now, if $h$ is really small, then $h^2$ is even smaller (e.g., $h = 10^{-8} \rightarrow h^2 = 10^{-16}$), so much that for all practical purposes we can assume $h^2 = 0$.

$$g(1+h,1) \approx f(2 + 2h, 3 - h)$$

We can use $f$'s partial derivatives to approximate it near $(2, 3)$.

$$g(1+h,1) \approx f(2, 3) + 2h f_x(2, 3) - h f_y(2, 3)$$

But we are given $f_x(2, 3) = 3$ and $f_y(2, 3) = 4$, so:

$$g(1+h,1) \approx f(2, 3) + (2h)(3) - (h)(4)$$ $$= f(2, 3) + 2h$$

By definition of derivative:

$$g_x(1, 1) = \lim_{h \rightarrow 0} \frac{g(1 + h, 1) - g(1,1)}{h}$$ $$= \lim_{h \rightarrow 0} \frac{f(2, 3) + 2h - f(2, 3)}{h}$$ $$= 2$$

Your mistake was essentially assuming that $g(1 + h, 1) = f(2 + h, 3)$, when it isn't.