<s>[INST] This is a math related homework. I want to evaluate the following expression
lim(h → 0) [f(x + h) - f(x)]/h where f(x)= x^3 - 2x^2 + 5x

I know this limit is the definition of a derivative but I am asked to actually evaluate the expression given.

Here are the steps I done so far:

f(x + h) - f(x) = (x+h)^3 - (2(x+h)^2 + (5)(x + h)) - (x^3 - 2x^2 + 5x)

= x^3 + 3hx^2 +3h^2x + h^3 - 2x^2 - 4hx - 2h^2 -5x - 5h - x^3 + 2x^2 - 5x

= h(3x^2 + 3hx + h^2 - 4x - 5 + 2h - 5)

= h(h^2 + 3hx + 3x^2 - 4x - 5)

now I want to plug this into the original expression and multiply by h to get
lim(h → 0) h(h^2 + 3hx + 3x^2 - 4x - 5)/h

I want to simplify this further.

Is it ok to cancel out one h on the top and one on the bottom because they are a common factor?[/INST]