Standard chain rule for and :
For a function with two variable, , there are two cases
Case 1:
Compute for .
This is analogous to the standard chain rule; we are going to compute an ordinary derivative since would be a function of is we substitute in for and . The chain rule is:
Basically, we differentiate with respect to each variable in it and then multiply each of these by the derivative of that variable with respect to , then add.
Special sub-case of Case 1:
In this case the chain rule for becomes:
Case 2:
Compute and for , , .
In this case if we were to substitute in for and , we would get as a function of and ; this is why we have to compute partial derivatives here and that there are two of them.
Thus, we have:
General Version of Chain Rule:
Suppose that is a function of variables, , and that each of these variables are in turn functions of variables, . Then for any variable , , we have:
Basically, we want to find the partial derivative of the big function with respect to the sub-functions, and then take the partial derivative of the sub-functions with respect to their variables. In tree form, for given that , , :