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
$$
 A: Note that we have
$$\begin{align}
\frac{\sqrt{x+1+h}}{2-x-h}-\frac{\sqrt{x+1}}{2-x}&=\frac{\sqrt{x+1+h}-\sqrt{x+1}}{2-x-h}+\frac{h\sqrt{x+1}}{(2-x-h)(2-x)}\\\\
&=\frac{h}{(2-x-h)(\sqrt{x+1+h}+\sqrt{x+1})}+\frac{h\sqrt{x+1}}{(2-x-h)(2-x)}\\\\
\end{align}$$
Now divide by $h$ and let $h\to 0$ to find
$$\frac{d}{dx}\left(\frac{\sqrt{x+1}}{2-x}\right)=\frac{1}{2(2-x)\sqrt{x+1}}+\frac{\sqrt{x+1}}{(2-x)^2}$$
A: We have that
$$\frac{\frac{\sqrt{(x+h)+1}}{2-(x+h)}-\frac{\sqrt{x+1}}{2-x}}h=\frac{\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}-\frac{\sqrt{x+1}}{2-x}\right)\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)}{h\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)}=$$
$$=\frac{\frac{(x+h)+1}{(2-(x+h))^2}-\frac{x+1}{(2-x)^2}}{h\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)}=\frac{\frac{((x+h)+1)(2-x)^2-(x+1)(2-(x+h))^2}{(2-(x+h))^2(2-x)^2}}{h\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)}=\ldots$$
and since (the cancellation in red is the crucial step)
$$((x+h)+1)(2-x)^2-(x+1)(2-(x+h))^2=$$
$$=\color{red}{(x+1)(2-x)^2}+h(2-x)^2\color{red}{-(x+1)(2-x)^2}+2h(x+1)(2-x)-h^2(x+1)=$$
$$=h(2-x)^2+2h(x+1)(2-x)-h^2(x+1)$$
we obtain
$$\ldots=\frac{\frac{h(2-x)^2+4h(x+1)(2-x)+h^2(x+1)}{(2-(x+h))^2(2-x)^2}}{h\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)}=\frac{(2-x)^2+2(x+1)(2-x)-h(x+1)}{\left(\frac{\sqrt{(x+h)+1}}{2-(x+h)}+\frac{\sqrt{x+1}}{2-x}\right)\left((2-(x+h))^2(2-x)^2\right)}\to$$
$$\to \frac{(2-x)^2+2(x+1)(2-x)}{\left(\frac{\sqrt{x+1}}{2-x}+\frac{\sqrt{x+1}}{2-x}\right)(2-x)^4}=\frac{(2-x)+2(x+1)}{2\sqrt{x+1}(x-2)^2}=\frac{x+4}{2\sqrt{x+1}(x-2)^2}$$
A: 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.
