The chain rule [3.3]

The derivative of a composite function

If $k(x)=f(g(x))$ then... $$\begineq k'(x)=&\lim_{h\to 0}\frac{k(x+h)-k(x)}{h} = \lim_{h\to 0}\frac{f(g(x+h))-f(g(x))}{h}\\ =&\lim_{h\to 0}\frac{f(g(x+h))-f(g(x))}{h} \cdot \frac{\color{blue}{g(x+h)-g(x)}}{\color{blue}{g(x+h)-g(x)}}\\ =& \lim_{h\to 0}\frac{f(g(x+h))-f(g(x))}{\color{blue}{g(x+h)-g(x)}}\cdot \frac{\color{blue}{g(x+h)-g(x)}}{h}\\ =& f'(g(x))\cdot g'(x). \endeq$$

The Chain Rule: If $y=f(z)$ and $z=g(t)$ are both differentiable, then the derivative of $y=f(g(t))$ is given by: $$\frac{dy}{dt}=\frac{dy}{dz}\frac{dz}{dt}.$$ The derivative of a composite function is the derivative of the outside function times the derivative of the inside function: $$\frac{d}{dt}\left[ f(g(t)) \right] = f'(g(t))\cdot g'(t).$$ Another way to write this is... $$\frac{d}{dt}\left[ f(g(t)) \right] = \color{blue}\frac{d}{dg}f(g(t))\cdot \color{red}\frac{d}{dt}g(t).$$

Example: If $y=(4t^3+5)^7$, then what is $y'(t)=?$

View this as $y(z)=z^7$ where $z(t)=4t^3+5$. The derivatives of these functions are: $$ y'(z)=7z^6; \ \ \ z'(t)=4*3t^2=12t^2$$

According to the chain rule, the derivative $y'(t)$ is: $$y'(t)=y'(z(t)) \cdot z'(t)=7(z)^6 12t^2 = 7(4t^3+5)^6 12t^2.$$ Which is this messy 20th order polynomial.

[ Handout ]
Which graph is $f(g(x))$?

Hint: Use the chain rule to write $$\frac{d}{dx}\left[ f(g(x)) \right]=f'(g(x))\cdot g'(x),$$ which means that the derivative of $f(g(x))$ will be zero when either $g'(x)=0$ or $f'(g(x))=0$

Homework tip

This notation: $$\frac{d}{dx}f(g(x))|_{x=2}$$ means calculate the derivative at $x=2$. You should always...

  1. Calculate the derivative first. (You'll have to use the chain rule to find $f'$ if $f( g(x) )$).
  2. You will have some expression that depends on $x$. Now substitute in $x=2$ and evaluate the derivative.

This is a way of helping you to *not* make this kind of mistake:

    $g(x) = x^2$. "Find $g'(2)$".

    Let's take the derivative of $g(2)=2^2=4. The derivative of 4 (a constant) is 0.
    No!

    You should always take the derivative first: $$g'(x)=2x$$

    Now you substitute $x=2$ into your expression for the derivative: $$g'(2)=2\cdot 2=\color{blue}4$$