f[x_]:=x^2(18-16x+3x^2)
Plot[f[x],{x,-1,4}]
Plot[{f[x],f'[x]},{x,-1,4},PlotRange->{-30,40}]