0

courseraMLForMathCalculus

Edit: From the @Klaus in comments, the original function is

fromComents

In the above example,from Imperial College of London math for Machine Learning on Coursera, I understand partial f/partial x since it is easy to treat the e term as a constant but for partial f / partial y, if y is the only term differentiated, my guess would be that the derivative is sin(x) * e ^z^2 as y becomes 1 and everything else is left untouched. For same reason partial f / partial z, my guess is sin(x) * e ^2yz.
But then somewhere I remember the derivative of e to anything is just the same so that is adding to my confusion. I think the product rule is supposed to be applied here but browsing through Khan academy and a few other online resources did not help me. Can someone please explain to my feeble mind how this unfolds step by step?

1 Answers1

1

When taking partial derivatives, you treat all other variables as parameters. So, for example, if you take the partial derivative with respect to $y$, then $x$ and $z$ are parameters. After that, you can use the usual differentiation rules from one-dimensional calculus. In this case, we have to use the chain rule: $$(g_1 \circ g_2)'(y) = g_1'(g_2(y))g_2'(y).$$ In the case at hand, $g_1(y) = \sin(x)e^y$ and $g_2(y) = yz^2$ so that $(g_1 \circ g_2)(y) = \sin(x)e^{yz^2}$. Hence, applying the chain rule, we get $$ \frac{\partial f}{\partial y}(x,y,z) = (g_1 \circ g_2)'(y) = g_1'(g_2(y))g_2'(y) = \sin(x)e^{g_2(y)}g_2'(y) = \sin(x)e^{yz^2}z^2$$ because $g_1'(y) = \sin(x)e^y$ and $g_2'(y) = z^2$. Similarly, you can do the partial derivative with respect to $z$.

Klaus
  • 10,578
  • I just watched this: https://www.khanacademy.org/math/ap-calculus-ab/ab-differentiation-2-new/ab-3-5b/v/using-the-product-rule-and-the-chain-rule but your explanation definitely adds to the clarity. – mLstudent33 Jan 10 '21 at 23:27