The chain rule is a method to compute the derivative of the functional composition of two or more functions.
If a function, , depends on a variable, , which in turn depends on another variable, , that is , then the rate of change of with respect to can be computed as the rate of change of with respect to multiplied by the rate of change of with respect to .
If a function is composed to two differentiable functions and , so that , then is differentiable and,

The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another.^{[1]} For example, if is a function of which is in turn a function of , which is in turn a function of , that is
the derivative of with respect to is given by
 and so on.
A useful mnemonic is to think of the differentials as individual entities that can be canceled algebraically, such as
However, keep in mind that this trick comes about through a clever choice of notation rather than through actual algebraic cancellation.
The chain rule has broad applications in physics, chemistry, and engineering, as well as being used to study related rates in many disciplines. The chain rule can also be generalized to multiple variables in cases where the nested functions depend on more than one variable.
Contents
ExamplesEdit
Example IEdit
Suppose that a mountain climber ascends at a rate of 0.5 kilometer per hour. The temperature is lower at higher elevations; suppose the rate by which it decreases is 6°C per kilometer. To calculate the decrease in air temperature per hour that the climber experiences, one multiplies 6°C per kilometer by 0.5 kilometer per hour, to obtain 3°C per hour. This calculation is a typical chain rule application.
Example IIEdit
Consider the function . It follows from the chain rule that
Function to differentiate  
Define as inside function  
Express in terms of  
Express chain rule applicable here  
Substitute in and  
Compute derivatives with power rule  
Substitute back in terms of  
Simplify. 
Example IIIEdit
In order to differentiate the trigonometric function
one can write:
Function to differentiate  
Define as inside function  
Express in terms of  
Express chain rule applicable here  
Substitute in and  
Evaluate derivatives  
Substitute in terms of . 
Example IV: absolute valueEdit
The chain rule can be used to differentiate , the absolute value function:
Function to differentiate  
Equivalent function  
Define as inside function  
Express in terms of  
Express chain rule applicable here  
Substitute in and  
Compute derivatives with power rule  
Substitute back in terms of  
Simplify  
Express as absolute value. 
Example V: three nested functionsEdit
The method is called the "chain rule" because it can be applied sequentially to as many functions as are nested inside one another. For example, if , sequential application of the chain rule yields the derivative as follows (we make use of the fact that , which will be proved in a later section):
Original (outermost) function  
Define as innermost function  
as middle function  
Express chain rule applicable here  
Differentiate f(g)^{[2]}  
Differentiate  
Differentiate  
Substitute into chain rule. 
Chain Rule in PhysicsEdit
Because one physical quantity often depends on another, which, in turn depends on others, the chain rule has broad applications in physics. This section presents examples of the chain rule in kinematics and simple harmonic motion. The chain rule is also useful in electromagnetic induction.
Physics Example I: relative kinematics of two vehiclesEdit
For example, one can consider the kinematics problem where one vehicle is heading west toward an intersection at 80mph while another is heading north away from the intersection at 60mph. One can ask whether the vehicles are getting closer or further apart and at what rate at the moment when the northbound vehicle is 3 miles north of the intersection and the westbound vehicle is 4 miles east of the intersection.
Big idea: use chain rule to compute rate of change of distance between two vehicles.
Plan:
 Choose coordinate system
 Identify variables
 Draw picture
 Big idea: use chain rule to compute rate of change of distance between two vehicles
 Express in terms of and via Pythagorean theorem
 Express using chain rule in terms of and
 Substitute in
 Simplify.
Choose coordinate system: Let the axis point north and the xaxis point east.
Identify variables: Define to be the distance of the vehicle heading north from the origin and to be the distance of the vehicle heading west from the origin.
Express in terms of and via Pythagorean theorem:
Express using chain rule in terms of and :
Apply derivative operator to entire function  
Sum of squares is inside function  
Distribute differentiation operator  
Apply chain rule to and  
Simplify. 
Substitute in and simplify
Consequently, the two vehicles are getting closer together at a rate of .
Physics Example II: harmonic oscillatorEdit
If the displacement of a simple harmonic oscillator from equilibrium is given by , and it is released from its maximum displacement at time , then the position at later times is given by
where is the angular frequency and is the period of oscillation. The velocity, , being the first time derivative of the position can be computed with the chain rule:
Definition of velocity in one dimension  
Substitute  
Bring constant outside of derivative  
Differentiate outside function (cosine)  
Bring negative sign in front  
Evaluate remaining derivative  
Simplify. 
The acceleration is then the second time derivative of position, or simply .
Definition of acceleration in one dimension  
Substitute  
Bring constant term outside of derivative  
Differentiate outside function (sine)  
Evaluate remaining derivative  
Simplify. 
From Newton's second law, , where is the net force and is the object's mass.
Newton's second law  
Substitute  
Simplify  
Substitute original . 
Thus it can be seen that these results are consistent with the observation that the force on a simple harmonic oscillator is a negative constant times the displacement.
Chain Rule in ChemistryEdit
The chain rule has many applications in Chemistry because many equations in Chemistry describe how one physical quantity depends on another, which in turn depends on another. For example, the ideal gas law describes the relationship between pressure, volume, temperature, and number of moles, all of which can also depend on time.
Chemistry Example I: Ideal Gas LawEdit
Suppose a sample of moles of an ideal gas is held in an isothermal (constant temperature, ) chamber with initial volume . The ideal gas is compressed by a piston so that its volume changes at a constant rate so that , where is the time. The chain rule can be employed to find the time rate of change of the pressure.^{[3]} The ideal gas law can be solved for the pressure, to give:
where and have been written as explicit functions of time and the other symbols are constant. Differentiating both sides yields
where the constant terms, , , and , have been moved to the left of the derivative operator. Applying the chain rule gives
where the power rule has been used to differentiate , Since , . Substituting in for and yields .
Chemistry Example II: Kinetic Theory of GasesEdit
A second application of the chain rule in Chemistry is finding the rate of change of the average molecular speed, , in an ideal gas as the absolute temperature , increases at a constant rate so that , where is the initial temperature and is the time.^{[3]} The kinetic theory of gases relates the root mean square of the molecular speed to the temperature, so that if and are functions of time,
where is the ideal gas constant, and is the molecular weight.
Differentiating both sides with respect to time yields:
Using the chain rule to express the right side in terms of the with respect to temperature, , and time, , respectively gives
Evaluating the derivative with respect to temperature, , yields
Evaluating the remaining derivative with respect to , taking the reciprocal of the negative power, and substituting , produces
Evaluating the derivative with respect to yields
which simplifies to
 .
Proof of the chain ruleEdit
Suppose is a function of which is a function of (it is assumed that is differentiable at and , and is differentiable at . To prove the chain rule we use the definition of the derivative.
We now multiply by and perform some algebraic manipulation.
Note that as approaches , also approaches . So taking the limit as of a function as approaches is the same as taking its limit as approaches . Thus
So we have
ExercisesEdit
ReferencesEdit
 ↑ http://www.math.brown.edu/help/derivtips.html
 ↑ The derivative of is ; see Calculus/Derivatives of Exponential and Logarithm Functions.
 ↑ ^{a} ^{b} University of British Columbia, UBC Calculus Online Course Notes, Applications of the Chain Rule, http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/derivative/chainap.html Accessed 11/15/2010.