Where is this negative coming from? (Help with the chain rule)

80 Views Asked by At

I am a high school student who is having trouble with understanding a resource which I am using for a resource project. The resource gives the derivative of a function as $-2(x-y)b$. I am getting the answer of $2(x-y) \times (-b)$. I am wondering if this is because they wanted to move the negative for simplicity sake (?). I provided a image showing my problem. If you need clarification about my problem feel free to comment. I would appreciate any help.

My Problem

1

There are 1 best solutions below

3
On BEST ANSWER

Negative comes from $\dfrac{\partial Z}{\partial y} = -2(x-y)$

This can be shown by $Z = (x-y)^2 = f(x, y)^2 = f^2$ where $f(x, y) = x - y$

Now $\dfrac{\partial Z}{\partial y} = \dfrac{dZ}{df}\dfrac{d f}{dy}$ as $x$ is independent of $y$.

$\dfrac{\partial Z}{\partial f} = 2f = 2(x-y)$

$\dfrac{d f}{dy} = -1$