Derivative Chain Rule $f(x) = (3x^2+2)^2 (x^2 -5x)^3$
I'm learning chain rule in derivative, and I don't understand this in the example.
$$f(x) = (3x^2+2)^2 (x^2 -5x)^3\\$$ \begin{align} f'(x)&= (3x^2 +2)^2[3(x^2 -5x)^2(2x-5)] + (x^2-5x)^3[2(3x^2+2)(6x)] \\&=3(3x^2 +2)(x^2-5x)^2[(3x^2+2)(2x-5)+4x(x^2-5x)] \\&= 3(3x^2 +2)(x^2-5x)^2[6x^3-15x^2+4x-10+4x^3-20x^2] \\&=3(3x^2+2)(x^2-5x)^2(10x^3-35x^2+4x-10) \end{align}
I understand the first line, because they just applied the chain rule,
but I don't understand the second line. I think they are simplifying it, but still I don't understand.
Could anyone explain what happened there? or add extra steps so it's easier??
$\endgroup$ 82 Answers
$\begingroup$Hint:
Put $(x^2- 5x)^2$, $(3x^2 + 2)$ and $3$ in evidence. Then
$$\begin{align}f'(x)&= \color{green}{(3x^2 + 2)}^2[\color{red} 3\color {#05f}{(x^2 - 5x)^2} (2x - 5)] + \color {#05f}{(x^2 - 5x)^3}[2\color{green}{(3x^2 + 2)}\color {red} 6 x]\\&=\color{red}3\color{green}{(3x^2 + 2)}\color{#05f}{ (x^2 - 5x)^2} \,[(3x^2 + 2)(2x - 5) + 4x (x^2 - 5)]\end{align}$$
$\endgroup$ 2 $\begingroup$\begin{align} f'(x) &= (3x^2 +2)^2[3(x^2 -5x)^2(2x-5)] + (x^2-5x)^3[2(3x+2)(3)]\\ &=3(3x^2+2)(x^2-5x)^2[(2x-5)-(x^2-5x)(2)] \\ &=3(3x^2+2)(x^2-5x)^2[2x-5-4x^2+10x] \\ &=3(3x^2+2)(x^2-5x)^2(-4x^2+12x-5) \end{align}
$\endgroup$ 1