It is a quadratic function with graph as parabola
and its maximum lies at the vertex
So we have to find the vertex
So firstly compare it with y=ax^2 +bx +c
we get a=-1 and b=0 and c=2
So to find the vertex (h,k)

to find k , plug h=0 inplace of x in the function

So vertex is (0,2)
And the maximum value is (0,2) which is the extreme of the function