2

Given $f(x,y)$, a function that has continuous partial derivatives in every point.

such that $\nabla f(0,-18)=-2i+3j$

We define a new function $g(x,y)=f(xy+x^2,xy-y^2)$ calculate $\nabla g(3,-3)$

How I tried to solve this? I need to find: $$\nabla g(3,-3)$ = g_x'(3,-3)i+g_y'(3,-3)j=f(xy+x^2,xy-y^2)_x'(3,-3)i+f(xy+x^2,xy-y^2)_y'(3,-3)j$$

and I have a formula for $\nabla g(3,-3)$, in other words I am evaluating the gradient of $g$ at the point $x=3$ and $y=-3$. In this formula I have the terms $f(xy+x^2, xy-y^2)^{'}_x$ and $f(xy+x^2, xy-y^2)^{'}_y$ so I need to substitute $x=3$ and $y=-3$ into them which gives me a final answer of $-2i+3j$ which is wrong.

RobPratt
  • 50,938
  • I got the right answer, but would strongly like to know what I did wrong –  Jun 18 '20 at 03:05

2 Answers2

1

I think you may have forgotten to apply the chain rule: here $g=f(\phi(x,y))$ so

$$\nabla g = D\phi \times \nabla f$$ where $$D\phi =\left(\begin{array}[cc] \;\frac{\partial\phi_x}{\partial x} & \frac{\partial\phi_y}{\partial x}\\ \frac{\partial\phi_x}{\partial y} &\frac{\partial\phi_y}{\partial y} \end{array}\right) = \left(\begin{array}[cc] \;2x +y & y \\ x & x-2y \end{array}\right) $$

So $\nabla g(3,-3) = \left(\begin{array}[cc] \;3& -3\\ 3& 9 \end{array}\right)\times \left(\begin{array}[c] \;-2 \\ \;\;3 \end{array}\right)$ and thus, dropping matrix notation, $\nabla g(3,-3)=-15 i +21j$.

I hope I didn't make any mistake..

Pohoua
  • 135
1

In short, you need to use the chain rule.

Let $u(x,y) = xy+x^2$, $v(x,y) = xy-y^2$. Then $g(x,y) = f(u(x,y),v(x,y))$. So $\frac{\partial u}{\partial x}(3,-3) = (y+2x)|_{x=3,y=-3}=-3+6=3$, and similarly $\frac{\partial v}{\partial x}(3,-3) = -3$. Notice that when $(x,y) = (3,-3)$, $(u,v) = (0,-18)$. Therefore, \begin{equation} \frac{\partial g}{\partial x}= \frac{\partial f}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial x} =-2\frac{\partial u}{\partial x}+3\frac{\partial v}{\partial x}=-2\times3+3\times(-3)=-15. \end{equation} And similarly, \begin{equation} \frac{\partial g}{\partial y}= \frac{\partial f}{\partial u}\frac{\partial u}{\partial y}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial y} =-2\frac{\partial u}{\partial y}+3\frac{\partial v}{\partial y}=-2\times3+3\times9=21. \end{equation}

  • Thanks, but what is wrong with what I did? –  Jun 18 '20 at 03:05
  • In your solution, it seems that you used $\frac{\partial f}{\partial u}$ for $\frac{\partial f}{\partial x}$. – Haoya Li Jun 18 '20 at 03:34
  • I mean $\frac{\partial f}{\partial u}$ is -2, but $\frac{\partial f}{\partial x}$ is not. – Haoya Li Jun 18 '20 at 03:36
  • In $g = f(u,v)$, $x$ is not the first input variable of $f$ anymore. Imagine that we fix $y=-3$, and change $x$ by a small amount, then $u,v$ are both changed by a small amount, so the change of $f(u,v)$ consists of two parts, the one caused by the change in u and the one caused by the cahnge in v. – Haoya Li Jun 18 '20 at 03:44