I want to find the derivative of the function: $h(x) = x^2(x+1)$
We know that the correct derivative is $h'(x) = 3x^2+2x$
I want to know if chain rule can as well be applied here: $h′(x)=f′(g(x))∗g′(x)$
Can we say the following?
We have the inner function $g(x)$, which adds one to the argument:
$g(x) = x+1$
And we have the outer function $f(x)$, which multiplies the argument by $x^2$:
$f(x) = x^2*x$ (or better write $f(y) = x^2*y$ to avoid confusion?).
But if I proceed and say $f'(x)=3x^2$ and $g'(x) = 1$, then $h′(x)=f′(g(x))∗g′(x) = 3(x+1)^2*1=3x^2+6x+3 \neq 3x^2+2x$
Please let me know where I am wrong and if chain rule is applicable here at all. I know that in this situation product rule is better to be used here. But if chain rule cannot be applied here, please explain where the logic breaks.
PS. I have seen a similar question here Finding derivative using product and chain rule and it implies that chain rule may be used.