Chain Rule for finding Derivatives

The chain rule is a differentiation rule used for finding the derivative of a composite function. A composite function is a function that can be written as the composition of two or more functions, e.g., f(g(x)). The chain rule allows us to break down the derivative of the composite function into the derivatives of its inner and outer functions.

The Chain Rule Formula

If h(x)=f(g(x)), where f and g are both differentiable functions, then the derivative of h is given by:

h(x)=f(g(x))·g(x)

In other words, to find the derivative of h(x):

  1. First, take the derivative of the outer function f, treating the inner function g(x) as the input variable.
  2. Next, multiply by the derivative of the inner function g.

This can be intuitively understood as:

  • f(g(x)) represents the rate of change of f with respect to g(x)
  • g(x) represents the rate of change of g(x) with respect to x
  • Multiplying these together gives the overall rate of change of f(g(x)) with respect to x, via the chain rule.

What is a Composite Function?

A composite function is a function that is formed by combining two or more functions, where the output of one function becomes the input of the next function. If f and g are two functions, then the composite function h(x)=f(g(x)) is the function obtained by applying f to the output of g.

In the notation f(g(x)):

  • g is called the inner function
  • f is called the outer function

The composite function h(x) can be evaluated by first evaluating the inner function g(x), and then evaluating the outer function f at the value of g(x).

Example

Let f(x)=x2 and g(x)=3x+1. Then the composite function h(x)=f(g(x)) is:

h(x)=f(g(x))=(3x+1)2=9x2+6x+1

Here, we first evaluate g(x)=3x+1, and then square the result to obtain h(x).

Composite functions can be more complex, involving multiple inner and outer functions. For example, sin(ln(x2+1)) is a composite function where:

  • The inner function is x2+1
  • The middle function is ln(x)
  • The outer function is sin(x)

Here, we would have to apply the chain rule several times to calculate the derivative.

Steps to Apply the Chain Rule

  1. Identify the composite function: Ensure that the given function is a composite function, meaning one function is nested inside another.

  2. Identify the inner and outer functions: Determine which function is the inner function (the one being evaluated first) and which is the outer function (the one that takes the result of the inner function as its input).

  3. Find the derivative of the outer function: Differentiate the outer function, treating the inner function as a variable.

  4. Find the derivative of the inner function: Differentiate the inner function with respect to its variable.

  5. Multiply the derivatives: Multiply the results from steps 3 and 4.

  6. Simplify the result: If necessary, simplify the final expression obtained from step 5.

When to Use the Chain Rule

The chain rule is used when differentiating a composite function of the form f(g(x)). If the composite function can be written as an outer function f applied to an inner function g, i.e. h(x)=f(g(x)), then the chain rule applies.

Some common examples where the chain rule is applicable include:

  • Functions raised to a power, e.g. (x2+1)3
  • Trigonometric functions with a non-trivial input, e.g. sin(x3), tan(x)
  • Exponential or logarithmic functions with a non-trivial input, e.g. ecos(x), ln(x2+1)

Examples

Let’s look at a couple examples to solidify our understanding.

Example 1

Find the derivative of h(x)=(3x2+1)5

We can rewrite h as a composite function: f(g(x)) where f(x)=x5 and g(x)=3x2+1

Applying the chain rule:

h(x)=f(g(x))·g(x)

f(x)=5x4, so f(g(x))=5(3x2+1)4

g(x)=6x

Therefore, h(x)=5(3x2+1)4·6x=30x(3x2+1)4

Example 2

Find the derivative of h(x)=sin(ln(x))

Rewriting as a composite function: f(x)=sin(x), g(x)=ln(x)

Applying the chain rule:

h(x)=f(g(x))·g(x)

f(x)=cos(x), so f(g(x))=cos(ln(x))

g(x)=1x

Therefore, h(x)=cos(ln(x))·1x=cos(ln(x))x