# Chain rule

This article/section deals with mathematical concepts appropriate for late high school or early college. |

The **chain rule** in calculus is a formula for determining the derivative of a composite function:

The chain rule can also be expressed as:

The chain rule can also be applied to multivariable functions. The derivative of a function with two variables is expressed as follows:

or in vector notation:

where r is the vector function

The function r is sometimes called the *path* of the particle.

Sometimes it might be helpful to change variables into a more convenient form before differentiating.

## Contents

## Examples

### Example with one Variable

Suppose we wish to find the derivative of the function:

However, we do not know how to find this but we do know the derivative of sine. Therefore, we can use the chain rule using x^{2} as g(x) and sin(g(x)) as f(g(x)). Therefore, using u to represent g(x):

Using standard results, these derivatives can be found and substituting back for u=x^{2} gives:

### Example with two Variables

Suppose the potential energy of a particle undergoing simple harmonic motion is described by the function V(x,y) and that both x and y are themselves functions of time. Now suppose we wish to find the rate of change potential energy with respect to time. To do this we must utilise the chain rule above. The potential for simple harmonic motion is:

and x and y are given by: and

where A, B, k and ω are constants. Applying the result above gives:

Substituting in for x and y produces the answer: