Gradient of function partitioned

16 Views Asked by At

I have a function that can be thought of as follows $$ f(x, y) = g(x) + h(y) $$ I want to take the gradient with respect to the full input $z = (x, y)$. How do I do this? $$ \nabla_z f(z) = \nabla_{x,y} f(x,y) = \nabla_{x,y} g(x) + \nabla_{x,y} h(y) = ? $$

1

There are 1 best solutions below

0
On BEST ANSWER

By definition of gradient $\nabla f(x,y) = (\partial_xf(x,y),\partial_yf(x,y))$. In your case $\partial_x f(x,y) = g'(x)$ and $\partial_y f(x,y) = h'(y)$ so $$\nabla f(x,y) = (g'(x),h'(y))$$