The chain rule in calculus is a fundamental formula used when performing differentiation of compound functions in one or multiple variables. For real-valued functions of several variables, the chain rule extends to an equation involving partial derivatives.
Chain rule in one independent variable
Suppose is a differentiable function in and , and both and are differentiable functions in . Then will also be a differentiable function in , and
This is the multivariate version of the familiar chain rule.
Here, the differentiability assumptions are important. When this assumption is violated, the partial derivatives and derivatives can interact in very complicated ways.
Distance to a point
Suppose the trajectory of a moving particle is given by the parametric equations Let be the distance between this particle and the point . Is a differentiable function in ? If yes, compute the derivative .
By the distance formula,
which is differentiable everywhere except at the origin . But the image of and never passes through the origin, so is indeed a differentiable function in .
We can compute that
Via chain rule, we can compute that
Alternatively, we can perform a simple substitution. By the distance formula,
Substituting in the formulae for and into this equation, we get
which is indeed differentiable for all . We can directly compute that.
While it may look like this is different from the answer we got from application of chain rule. These answer are indeed equivalent.
Distance between two moving points
Suppose the trajectories of two moving particles are given by the parametric equations
Express the instantaneous rate of change of the distance between the two moving particles as a function of .
First we compute the partial derivatives
Note that each of these partial derivatives are defined and continuous away from configurations where and . In other words, as long as the two particles do not run into each other, these partial derivatives are defined and continuous. Under that assumption, is a differentiable function in . This assumption is indeed valid: Notice that the two particles circle around the origin from different distance and will therefore never collide. We can also compute that
which are all defined for all values. By chain rule, is a differentiable function of . Moreover,
Resistors in a parallel circuit
The total resistance (in ohms) of two resistors connected in parallel is given by
Suppose the resistance of both resistors are changing and their values are given by the functions
where represent time (measured in seconds). Is a differentiable function of ? If yes, compute the derivative .
From (Equation 1), we get
and we can compute its partial derivatives
Since both partial derivatives are defined and continuous for , (as defined in (Equation 1)) is indeed differentiable. Moreover, are both differentiable in , so is also a differentiable function in . Indeed, by chain rule,