differentiate x(x-3)^2

do I product and chain rule?

4 answers

f= uv
f'=uv'+vu'

f'= 1*(x-3)^2+ 2x(x-3)*1
shouldn't it be 1 * (x-3)^2 + 2x(x-3)^1 ? instead of 2x(x-3) * 1 at the end?
oh wait nvm i see what i did wrong
x(x-3)^2
=x(x-3)(x-3)
=x(x^2-3x-3x+9)
=x^3-6x^2+9x
=3x^2-12x+9