There are several methods of finding the extrema(plural of extremums or in other words minimum or maximum values) of a function.
For now we will analyse the function using the dy/dx of f(x)=y=x2 +1, f`(x) = 2x
The sign of the diferentiation of the function change at x=0. Therefore for x<0 dy/dx<0 and the function is declining. For x>0 dy/dx>0 and the function is uprising. We can conclude that there is a minimum at x=0. We cannot find a maximum of the function as it approaches infinity.