# Math Insight

### A refresher on the chain rule

The chain rule is subtler than the previous rules, so if it seems trickier to you, then you're right. OK. But it is absolutely indispensable in general and later, and already is very helpful in dealing with polynomials.

The general assertion may be a little hard to fathom because it is of a different nature than the previous ones. For one thing, now we will be talking about a composite function instead of just adding or multiplying functions in a more ordinary way. So, for two functions $f$ and $g$, $${d\over dx}\left(f(g(x)\right)=f'(g(x))\cdot g'(x)$$ There is also the standard notation $$(f\circ g)(x)=f(g(x))$$ for this composite function, but using this notation doesn't accomplish so very much.

A problem in successful use of the chain rule is that often it requires a little thought to recognize that some formula is (or can be looked at as) a composite function. And the very nature of the chain rule picks on weaknesses in our understanding of the notation. For example, the function $$F(x)=(1+x^2)^{100}$$ is really obtained by first using $x$ as input to the function which squares and adds $1$ to its input. Then the result of that is used as input to the function which takes the $100$th power. It is necessary to think about it this way or we'll make a mistake. The derivative is evaluated as $${d\over dx}(1+x^2)^{100}=100(1+x^2)^{99}\cdot 2x$$

To see that this is a special case of the general formula, we need to see what corresponds to the $f$ and $g$ in the general formula. Specifically, let $$f(\hbox{input})=(\hbox{input})^{100}$$ $$g(\hbox{input})=1+(\hbox{input})^2$$ The reason for writing ‘input’ and not ‘x’ for the moment is to avoid a certain kind of mistake. But we can compute that $$f'(\hbox{input})=100(\hbox{input})^{99}$$ $$g'(\hbox{input})=2(\hbox{input})$$ The hazard here is that the input to $f$ is not $x$, but rather is $g(x)$. So the general formula gives $${d\over dx}(1+x^2)^{100}=f'(g(x))\cdot g'(x)=100g(x)^{99}\cdot 2x= 100(1+x^2)^{99}\cdot 2x$$

More examples: $${d\over dx}\sqrt{3x+2}={d\over dx}(3x+2)^{1/2}= {1\over 2}(3x+2)^{-1/2}\cdot 3$$ $${d\over dx}(3x^5-x+14)^{11}=11(3x^5-x+14)^{10}\cdot(15x^4-1)$$

It is very important to recognize situations like $${d\over dx}(ax+b)^n=n(ax+b)^{n-1}\cdot a$$ for any constants $a,b,n$. And, of course, this includes $${d\over dx}\sqrt{ax+b}={1\over 2}(ax+b)^{-1/2}\cdot a$$ $${d\over dx}{1\over ax+b}=-(ax+b)^{-2}\cdot a={-a\over (ax+b)^2}$$

Of course, this idea can be combined with polynomials, quotients, and products to give enormous and excruciating things where we need to use the chain rule, the quotient rule, the product rule, etc., and possibly several times each. But this is not hard, merely tedious, since the only things we really do come in small steps. For example: $${d\over dx}\left({1+\sqrt{x+2} \over (1+7x)^{33}}\right)= {(1+\sqrt{x+2})'\cdot (1+7x)^{33} -(1+\sqrt{x+2})\cdot((1+7x)^{33})' \over ((1+7x)^{33})^2}$$ by the quotient rule, which is then $${({1\over 2}(x+2)^{-1/2})\cdot (1+7x)^{33} -(1+\sqrt{x+2})\cdot((1+7x)^{33})' \over ((1+7x)^{33})^2}$$ because our observations just above (chain rule!) tell us that $${d\over dx}\sqrt{x+2}={1\over 2}(x+2)^{-1/2}\cdot (x+2)' ={1\over 2}(x+2)^{-1/2}$$ Then we use the chain rule again to take the derivative of that big power of $1+7x$, so the whole thing becomes $${({1\over 2}(x+2)^{-1/2})\cdot (1+7x)^{33} -(1+\sqrt{x+2})\cdot(33(1+7x)^{32}\cdot 7) \over ((1+7x)^{33})^2}$$

Although we could simplify a bit here, let's not. The point about having to do several things in a row to take a derivative is pretty clear without doing algebra just now.

#### Exercises

1. Find ${ d \over dx }((1-x^2)^{100})$
2. Find ${ d \over dx }\sqrt{x-3}$
3. Find ${ d \over dx }(x^2-\sqrt{x^2-3})$
4. Find ${ d \over dx }(\sqrt{x^2+x+1})$
5. Find ${ d \over dx }({\root 3 \of {x^3+x^2+x+1}})$
6. Find ${ d \over dx }((x^3 + \sqrt{x+1})^{10})$