# Solving a limit approaching zero with a complex denominator

We've been given the definition of a derivative as:

$$f'(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$$

We are asked to use this to find the derivative of the function $f(x)=\frac{1}{1-x}$ showing every step.

I can get to here: $$f'(x)=\lim_{h\to0}\frac{1}{h-hx-h^2}-\frac{1}{h-hx}$$

When I try using online equation solvers they just jump straight to the answer and I can't figure out how. Wolfram Alpha's step-by-step solution also doesn't give me any intermediate steps between this and the solution:

$$\frac{1}{(x-1)^2}$$

So, my question is, how do I solve a limit like the one above where every value in the denominator approaches 0?

(I'm guessing I'm just missing some algebraic tricks)

-

Remark: It would have made life easier if you had kept the $h$ "outside," that is, looked at $$\frac{1}{h}\left(\frac{1}{1-x-h} -\frac{1}{1-x}\right).$$ Then same common denominator hint, somewhat less messy.
$$\dfrac{\dfrac1{(1-x-h)} - \dfrac1{(1-x)}}{h} = \dfrac{\dfrac{(1-x) - (1-x-h)}{(1-x)(1-x-h)}}{h} = \dfrac{h}{h(1-x)(1-x-h)} = \dfrac1{(1-x)(1-x-h)}$$ Now apply the limit.