We calculate the first derivative
#f(x)=x^3+3x^2+1#
#f'(x)=3x^2+6x#
The critical points are when, #f'(x)=0#
#3x^2+6x=0#
Factorising yields
#3x(x+2)=0#
Therefore,
#x=0 or x=-2#
We build a chart
#color(white)(aaaa)##x##color(white)(aaaa)##-oo##color(white)(aaaa)##-2##color(white)(aaaa)##0##color(white)(aaaa)##+oo#
#color(white)(aaaa)##x+2##color(white)(aaaaa)##-##color(white)(aaaa)##+##color(white)(aaaa)##+#
#color(white)(aaaa)##x##color(white)(aaaaaaaaa)##-##color(white)(aaaa)##-##color(white)(aaaa)##+#
#color(white)(aaaa)##f'(x)##color(white)(aaaaaa)##+##color(white)(aaaa)##-##color(white)(aaaa)##+#
#color(white)(aaaa)##f(x)##color(white)(aaaaaaa)##↗##color(white)(aaaa)##↘##color(white)(aaaa)##↗#
Now, we calculate the second derivative
#f''(x)=6x+6#
The inflexion point is when #f''(x)=0#
#6x+6=0#
#x=-1#
The inflexion point is #(-1,3)#
We calculate
#f''(-2)=6*-2+6=-6#
As #f''(-2)<0#, we have a local maximum at #(-2,5)#
#f''(0)=6#
As #f''(0)>0#, we have a local minimum at #(0,1)#
We build another chart to determine the convexity and concavity
#color(white)(aaaa)##Interval##color(white)(aaaa)##(-oo,-1)##color(white)(aaaa)##(-1,+oo)#
#color(white)(aaaa)##f''(x)##color(white)(aaaaaaaaaaa)##-##color(white)(aaaaaaaaaaa)##+#
#color(white)(aaaa)##f(x)##color(white)(aaaaaaaaaaaaa)##nn##color(white)(aaaaaaaaaaa)##uu#
graph{x^3+3x^2+1 [-14.66, 13.82, -5.92, 8.32]}