# Chain rule

Lets explore what Wolfram|Alpha can do with more complicated derivatives.

Function composition is when one function is evaluated by the output of another function. For example, $$f( x+h )$$ can be viewed as a composite function where the outside function is $$f(x)$$ and the inside function is $$g(x)=x+h$$. Notice $$f(g(x)) = f(x+h)$$

Thats fun and all, but the trick for us will be to go backwards. Can you think of two functions that might be hiding in the expression, $$(x^3-1)^2$$?

For each function below, find $$a(b)$$ and $$b(x)$$ so that $$f(x) = a( b(x))$$. Also, this is calculus class so might as well compute each derivative!

1. $$f(x) = (x^2+x+1)^3$$

 $$a(b)$$ $$a'(b)$$ $$b(x)$$ $$b'(x)$$

2. $$f(x) = \sqrt{ 3x^3 -1 }$$

3. $$f(x) = e^{x^3}$$

4. $$f(x) = \sin(2x^3+x)$$

Compute each $$f'(x)$$ above using Wolfram|Alpha. How is each $$f'(x)$$ is related to $$a(b), b(x), a'(b), b'(x)$$?