<s>[INST] How would you calculate a derivative of $ f(x)= \frac{\sqrt{x+1}}{2-x}$ by the limit definition? I have a function defined as follows:
$$
f(x)= \frac{\sqrt{x+1}}{2-x}
$$
I tried to calculate the derivative using the limit definition using four methods, but I was unsuccessful in any. Could someone help me calculate it and explain the method?
$$
1) \lim_{h\to 0} =\frac{\frac{\sqrt{(x+h)+1}}{2-(x+h)}-\frac{\sqrt{x+1}}{2-x}}h
$$
$$
2)\lim_{z\to x} =\frac{\frac{\sqrt{z+1}}{2-z}-\frac{\sqrt{x+1}}{2-x}}{z-x}
$$
$$
3)\;f(x)= \frac{\sqrt{x+1}}{2-x}; u=\sqrt{x+1}
$$
$$
\lim_{h\to 0} =\frac{\frac{u+h}{3-(u+h)^2}-\frac{u}{3-u^2}}h
$$
$$
4)\;f(x)= \frac{\sqrt{x+1}}{2-x}; u={x+1};
$$
$$
\lim_{h\to 0} =\frac{\frac{\sqrt{u+h}}{3-(u+h)}-\frac {\sqrt{u}}{3-u}}h
$$
 [/INST] Taking the first definition :
$$\lim_{h\to 0} \frac{\frac{\sqrt{(x+h)+1}}{2-(x+h)}-\frac{\sqrt{x+1}}{2-x}}h  = \lim_{h\to 0} \frac{\sqrt{(x+h)+1}(2-x)-\sqrt{x+1}(2-(x+h))}{(2-(x+h))(2-x)h}$$$$=
\lim_{h\to 0} \frac{(x+h+1)(2-x)^2-(x+1)(2-x-h)^2}{(2-x-h)(2-x)h( \sqrt{(x+h)+1}(2-x)+\sqrt{x+1}(2-(x+h)) )} $$
$$= \lim_{h\to 0} \frac{h^2(-x-1)+h(-x^2-2x+8)}{(2-x-h)(2-x)h( \sqrt{(x+h)+1}(2-x)+\sqrt{x+1}(2-(x+h)) )} $$ $$= \frac{-x^2-2x+8}{(2-x)^2\cdot(2\sqrt{x+1}(2-x))}=-\frac{x+4}{2(2-x)^2\sqrt{x+1}}
$$
Too heavy calculations though, don't use the definition for such derivatives.
</s>