# Calculus chain rule taking derivative twice

How would I figure out the following question.

Find $f''(x)$ if $f(x)=(x^2-6x-7)^{11}$

Using the chain rule I got the first derivative as.

$11(x^2-6x-7)^{10}(2x-6)$

Applying both the chain rule and the product rule I got

for my second derivative

$f''(x)=11(x^2-6x-7)^{10}(2)+(2x-6)(110)(x^2-6x-7)^9(2x-6)$

However did I do this correctly?

• It looks good to me. Typo, $f(x)''$ in last row. – Cortizol Feb 15 '13 at 18:42
• The "prime" should come after the $f$. It is the function that you are differentiating. Hence $f'(x)$ and $f''(x)$ are correct while $f(x)'$ and $f(x)''$ are incorrect. – Fly by Night Feb 15 '13 at 18:47
• yes that is true. – Fernando Martinez Feb 15 '13 at 18:48
• Yes! – P.. Feb 15 '13 at 18:50
• Hmm in wolfram alpha it is written differently but I guess it is simplified If I try and simplify it I will probably make an error... – Fernando Martinez Feb 15 '13 at 18:54

Alternatively you could write $x^2-6x-7=(x+1)(x-7)$ so you can differentiate twice: $$(x+1)^{11}(x-7)^{11}$$

using just the product rule.

You can further simplify it as

$(-x^2 + 6x + 7)^9(-22x^2 + 132x - 440(x - 3)^2 + 154)$

or rearranging signs

$(x^2 - 6x - 7)^9(22x^2 - 132x + 440(x - 3)^2 - 154)$

and finally

$22(x^2 - 6x - 7)^9(21x^2 - 126x + 173)$

• Your simplify routine seems to add a few too many minus signs. – Thomas Andrews Feb 15 '13 at 19:03