differentiate from first principles

y=1/x^2

i get to this then i get stuck

f(x+h)-f(x) = 1/(x+h)^2 - 1/x^2
= x^2 - x^2 -2xh -h^2
above divided by(x^2+2xh+h^2)(x^2)
= -2xh -h^2/x^4+2x^3h+h^2x^2

then i know i need to divide by h but i cant seem to get to what i want

2 answers

You're on the right track. You just have to expand the numerator, without expanding the denominator.

The reason is because in the numerator, you would like to see the x² terms disappear, surfacing the -2xh term which is critical to cancel the h in the denominator. As h→0, (x+h)² would evaluate like x² in the denominator. The complete works would look like:

f(x)=1/x²
Lim x→0 f(x)
=Lim x→0 (f(x+h)-f(x))/h
=Lim x→0 (1/(x+h)²-1/x²)/h
Lim x→0 (x²-x²-2xh-h²)/(h(x+h)²x²))
=Lim x→0 (-2xh-h²)/(h(x+h)²x²))
=Lim x→0 (-2x-h) / (x+h)²x²)
=-2/x³
Lim x→0 f(x)
should read
f'(x)