Bear with me folks, I'm only learning.
How do I differentiate $y=\frac{1}{x}$ from first principles? I get to:
$\frac{dy}{dx}=\frac{y_2-y_1}{x_2-x_1}=\frac{\left(\frac{1}{x+h}\right)-\left(\frac{1}{x}\right)}{h}$
I then try to find a common denominator to subtract the terms in the numerator, but am then left with $\frac{dy}{dx}=\frac{-\frac{h}{x^2+xh}}{h}$ which always seems to reduce to zero (with $h$ tending to zero).
What's particularly frustrating is that I can easily find the answer ($-\frac{1}{x^2}$) using differentiation from rules. Any help enormously welcome.