The middle variable in the Chain Rule

493 Views Asked by At

I often see people introduce a middle variable z to compute the derivative dy/dx using the Chain Rule: dy/dx=dy/dzdz/dx. I wonder if z should satisfy some conditions. If z can be any variable, e.g., an independent variable that has nothing to do with y and x, then dy/dz=0, dz/dx=0, so dy/dx=dy/dzdz/dx=0*0=0, which is obviously wrong. I read in some books that the condition is y is differentiable to z and z is differentiable to x. But this is not true as seen in this example.