
Doug C. answered 10/31/23
Math Tutor with Reputation to make difficult concepts understandable
The graph of the function P(x) = -x2 + 2x is a downward opening parabola (because the coefficient of the x2 term is negative).
That means that locating the vertex will provide the location of the local max (this is also a global max for the function, i.e. the function never generates a y-value greater than the y-value of the vertex).
There are several ways to locate the vertex.
One way is to determine the axis of symmetry using the formula x = -b/2a (in this case a = -1 and b = 2).
So the axis of symmetry is x = -2/(2)(-1) = 1. Since the vertex lies on the axis of symmetry, the x-coordinate of the vertex is also 1. Plug that value into the function to determine the y-coordinate of the vertex.
P(1) = -(1)2 + 2(1) = 1.
So the vertex is at (1,1). The max values occurs when x = 1 and the max value is 1 too.
P(x) can also be written as:
P(x) = -x (x - 2). This tells you the roots are at (0,0) and (2,0). The axis of symmetry passes through the midpoint of the segment joining the roots (1, 0).
Yet another way to find the vertex is to transform the function into vertex form by a process called completing the square.
P(x) = -(x2 - 2x + ) [ factor out the -1 leading coefficient, leaving a space to convert the expression inside the parentheses to a perfect square trinomial -- by completing the square).
P(x) = - (x2 -2x + 1) + 1 [the +1 inside the parentheses completes the square. By placing that +1 inside the parentheses a -1 has really be added because of the -1 outside, so add a +1 outside the parentheses to keep the equation in balance.
Finally rewrite the perfect square trinomial as a binomial squared:
P(x) = - (x - 1)2 + 1
This is called vertex form because it is easy to identify the vertex (1,1). Note that when x = 1 the the first term has a value of zero, so the function value is 0 + 1 = 1. If x is any other value then the first term has a negative value so the result will be a y-value less than 1, i.e. the max value of the function is the y-coordinate of the vertex.
desmos.com/calculator/kith1niagf

Doug C.
Here is another Desmos graph that allows you to move the vertex; both standard form and vertex form are displayed: desmos.com/calculator/svhhjqa4xm10/31/23