Find and simplify the difference quotient for the given function.

f(x)= -x^2+2x-1

I need to know how to set up the equations and simplify everything when dividing by h at the end.

2 answers

I have seen the difference quotients defined as
(f(x+h) - f(x) / h

in your case:
( -(x+h)^2 + 2(x+h) - 1 - (-x^2 + 2x - 1))/h
= ( -x^2 - 2hx - h^2 + 2x + 2h - 1 + x^2 - 2x + 1)/h
= (-2hx - h^2 + 2h)/h
= -2x - h + 2 , h ≠ 0
Found my error! Thank you! 2xh i wans't carrying that in when distributing