find the derivative of $\displaystyle y=\frac{x+1}{x-1}$ using first principles
so
$\displaystyle \frac{f(x+h)-f(x)}{h}$
$\displaystyle
\frac{(x+h)+1}{(x+h)-1} - \frac{x+1}{x-1}$ all over h
can't get the right answer
$\displaystyle f(x+h)-f(x)=\frac{x+1+h}{x-1+h}-\frac{x+1}{x-1}$
$\displaystyle =\frac{(x-1)(x+1+h)-(x+1)(x-1+h)}{(x-1+h)(x-1)}$
$\displaystyle =\frac{\color{blue}(x-1)(x+1)\color{black}+(x-1)h\color{blue}-(x+1)(x-1)\color{black}-(x+1)h}{(x-1)(x-1)+h(x-1)}$
$\displaystyle =\frac{xh-h-xh-h}{(x-1)^2+h(x-1)}$
$\displaystyle =\frac{-2h}{(x-1)^2+h(x-1)}$
$\displaystyle \frac{f(x+h)-f(x)}{h}=\frac{-2}{(x-1)^2+h(x-1)}$
setting h=0, the derivative is
$\displaystyle f'(x)=\frac{-2}{(x-1)^2}$