The Chain Rule

Dealing with functions inside other functions (Composite Functions).

Most functions we encounter in real life aren't simple like or sin(x). They are usually combinations, like sin(x²) or (2x + 1)⁵. When one function is nested inside another, we call it a Composite Function.

To find the derivative of these nested functions, we need The Chain Rule.

[Image of composite function machine diagram]

1. The Logic: Layers of an Onion

Think of a composite function like an onion with layers. To differentiate it, you must peel it from the outside in.

  • Step 1: Differentiate the "Outside" layer (leaving the inside alone).
  • Step 2: Multiply by the derivative of the "Inside" layer.

2. The Formula

Lagrange Notation:
If h(x) = f(g(x)), then:
h'(x) = f'(g(x)) · g'(x)

Leibniz Notation:
dy/dx = (dy/du) · (du/dx)
(Where u is the inside function)

3. Step-by-Step Examples

Example A: Power Chain Rule

Let's look at y = (3x + 1)⁵.

  • Outside Function: Something to the power of 5: (u)⁵.
  • Inside Function: 3x + 1.
1. Derivative of Outside: 5(3x + 1)⁴
2. Derivative of Inside: 3
3. Multiply them: 5(3x + 1)⁴ · 3
Final Answer: 15(3x + 1)⁴

Example B: Trig Chain Rule

Let's look at y = sin(x²).

  • Outside: sin(something). Derivative is cos(something).
  • Inside: x². Derivative is 2x.
y' = cos(x²) · 2x
Final Answer: 2x cos(x²)

4. Common Pitfall: "Double Differentiating"

A very common mistake is to differentiate the inside function while you are doing the outside function. Do not do this!

Wrong: For (3x+1)⁵, writing 5(3)⁴. (You changed the inside too early!).
Right: Keep the inside the same for the first step: 5(3x+1)⁴.

5. Why is it called the "Chain" Rule?

It's called the Chain Rule because you can link as many functions as you want. If you have f(g(h(x))), you just keep multiplying by the derivative of the next layer.

Derivative = Outside' · Middle' · Inside'