# f(x) = ( \frac{ (1+x)^4 }{ (x^2-2)^3 }) ^2 #
To see the rules in action, it helps to write the parts as individual functions. We'll do it in steps.
# f(x) = g(h(x)) # where # g(x) = x^2 # and # h(x) = \frac{ (1+x)^4 }{ (x^2-2)^3 } #
We broke #f# up into two functions, one of which #g# just squares its input, and the other #h# is that complicated fraction. We composed #g# and #h# to get #f# which means we need to use the chain rule to take the derivative. The chain rule says:
If #f(x) = g(h(x)) # then # f'(x) = g'( h(x)) \ h'(x) #
It looks complicated but its use is simple. We take the derivative of the outer function as if its parameter was a variable like x, then we multiply that by the derivative of the parameter. In our case #g(x)=x^2 # whose derivative (by the power rule) is #2x# so
#f'(x) = 2 h(x) h'(x) = \frac{ 2 (1+x)^4 }{ (x^2-2)^3 } h'(x) #
We started with a complicated problem so we still have the derivative of #h# to take. As a simpler example of the chain rule, the derivative of # (3x+4)^2# is #2 (3x + 4) (3) = 18x + 24#.
# h(x) = frac{ m(x) } { n(x) } # where # m(x)=(1+x)^4 # and #n(x)= (x^2-2)^3 #
The quotient rule says if # h(x) = frac{ m(x) } { n(x) } # then
# h'(x) = frac{ n(x) m'(x) - m(x) n'(x) }{ (n(x))^2 } #
Let's take the derivatives of #m# and #n# first. We'll apply the chain rule without explicitly writing out the functions.
# m(x)=(1+x)^4 #
# m'(x) = 4(1+x)^3 #
The derivative of #x^4# is #4x^3#. Here the derivative of the "inside" #1+x# is just #1# so we're done.
# n(x) = (x^2-2)^3 #
#n'(x) = 3 ( x^2 - 2)^2 (2x) = 6x(x^2-2)^2 #
That one was a little more complicated because the derivative of the "inside" was #2x#. It's generally best to leave things factored as long as possible.
# h'(x) = frac { (x^2-2)^3 4(1+x)^3 - (1+x)^4 6x(x^2 - 2)^2 }{ (x^2-2)^6} #
# h'(x) = frac{ -2(x+1)^3(x^2-2)^2( -2(x^2-2) + 3x(1+x) ) }{ (x^2-2)^6} #
# h'(x) = frac{ -2(x+1)^3( x^2 + 3x +4 ) }{ (x^2-2)^4} #
Now we can put it all together,
#f'(x) = frac{ 2 (1+x)^4 }{ (x^2-2)^3 } cdot frac{ -2(x+1)^3( x^2 + 3x +4 ) }{ (x^2-2)^4} #
#f'(x) = - frac{ 4(1+x)^7 ( x^2 + 3x +4 ) }{ (x^2-2)^7} #