

Given f(x) = (x+1)/x
and f(x+h) = (x+h+1)/(x+h)
Now using first principle,
dy/dx = limh->0 [{f(x+h) - f(x)}/h]
=> dy/dx = limh->0 [{(x+h+1)/(x+h) - (x+1)/x}/h]
=> dy/dx = limh->0 [{(x+h+1)*x - (x+h)*(x+1)}/{h*x*(x+h)}]
=> dy/dx = limh->0 [{(x2 + hx + x) - (x2 + x + hx + h)}/{h*x*(x+h)}]
=> dy/dx = limh->0 [-h/{h*x*(x+h)}]
=> dy/dx = limh->0 [-1/{x*(x+h)}]
=> dy/dx = -1/{x*(x+0)}
=> dy/dx = -1/x2
