How to calculate the extremum of function y = x into x + 2x + 1?

How to calculate the extremum of function y = x into x + 2x + 1?

Method 1: y = x ^ 2 + 2x + 1
=(x+1)^2
Y has a minimum, and the minimum is o
Method 2: - (4x1-2 ^ 2) / 4x1 = 0