write a rule for the function in the form you would use to graph it

We are given the following function
[tex]f(x)=-x^2+2x-2[/tex]The standard form of a quadratic function is given by
[tex]f(x)=ax^2+bx+c[/tex]Comparing the given function with the standard form, we see that
a = -1
b = 2
c = -2
It is usually preferred to write the function in vertex form for graphing
The vertex form is given by
[tex]f(x)=a(x-h)^2+k[/tex]Where h is the vertex (maximum/minimum point of the graph) and is given by
[tex]h=-\frac{b}{2a}=-\frac{2}{2(-1)}=-\frac{2}{-2}=1[/tex]Where k is given by
[tex]\begin{gathered} k=f(h) \\ k=f(1) \\ k=-(1)^2+2(1)-2 \\ k=-1+2-2 \\ k=-1 \end{gathered}[/tex]So, we have
a = -1
h= 1
k = -1
Therefore, the vertex form of the given function is
[tex]\begin{gathered} f(x)=a(x-h)^2+k \\ f(x)=-(x-1)^2-1 \end{gathered}[/tex]