As #y=(x-1)^2(x+3)#
#(dy)/(dx)=2(x-1)xx(x+3)+(x-1)^2#
= #2(x^2+3x-x-3)+x^2-2x+1#
= #3x^2+2x-5#
= #3x^2-3x+5x-5#
= #3x(x-1)+5(x-1)#
= #(3x+5)(x-1)# whose zeros are #-5/3# and #1#
Now using Sign Chart
#color(white)(XXXXXXXXXXX)-5/3color(white)(XXXXX)1#
#(x-1)color(white)(XXX)-ive color(white)(XXXX)-ive color(white)(XXXX)+ive#
#(3x+5)color(white)(XXX)-ive color(white)(XXXX)+ive color(white)(XXXX)+ive#
#(3x+5)(x-1)color(white)()+ive color(white)(XXX)-ive color(white)(XXXX)+ive#
Hence, the function #y=(x-1)^2(x+3)# is rising in the interval #(-oo,-5/3)# and then it starts declining in the interval #(-5/3,1)# and then again rising in the interval #(1, oo)#
#-5/3# amd #1# are local maxima and minima.
graph{(x-1)^2(x+3) [-5, 5, -10, 10]}