Show the limit holds true. I have to show that: lim$_{x\rightarrow 2} \displaystyle\frac{1}{x} = \frac{1}{2}$
So far I have: 
$|f(x)-L|<\epsilon \leftrightarrow |\displaystyle\frac{1}{x}-\frac{1}{2}|<\epsilon \leftrightarrow |\displaystyle\frac{x-2}{2x}|< \epsilon \leftrightarrow \frac{1}{2x} \cdot |x-2| < \epsilon \leftrightarrow |x-2| < \frac{2x}{\epsilon}$. So $\delta=\displaystyle\frac{2x}{\epsilon}$. 
My question is: Is it okay for $\delta$ to depend on $x$?
 A: Remember that by definition
$$\lim_{x\rightarrow a} f(x) = L \iff \forall \varepsilon >0\, \exists \delta > 0: 0<\vert x-a\vert <\delta \implies \vert f(x)-L\vert <\varepsilon$$
To find the optimal $\delta$ you can proceed as follow
$$\left|\frac1x-\frac12 \right|<\epsilon \iff -\epsilon<\frac1x-\frac12 <\epsilon\iff -\epsilon+\frac12<\frac1x<\epsilon+\frac12$$
$$\iff \frac{1-2\epsilon}2<\frac1x<\frac{1+2\epsilon}2\iff \frac2{1+2\epsilon}<x<\frac2{1-2\epsilon}$$
$$\iff \frac2{1+2\epsilon}-2<x-2<\frac2{1-2\epsilon}-2$$
$$\iff \frac{-4\epsilon}{1+2\epsilon}<x-2<\frac{4\epsilon}{1-2\epsilon}$$
thus
$$|x-2|<min\{\frac{4\epsilon}{1-2\epsilon},\frac{4\epsilon}{1+2\epsilon} \}=\frac{4\epsilon}{1+2\epsilon}=\delta$$
A: Rephrasing:
Let $x>0,$  real.
$|\dfrac{1}{x}-\dfrac{1}{2}| =\dfrac{|2-x|}{|2x|}.$
Consider $|x-2| \lt 1,$
then $1<x<3.$
Let $\epsilon >0$ be given.
Choose $\delta < \min(1,2\epsilon)$.
Then $|x-2| < \delta$ implies 
$|\dfrac{1}{x}-\dfrac{1}{2}| = $
$\dfrac{|2-x|}{2|x|} \lt \dfrac{\delta}{2\cdot 1} \lt  \epsilon.$
A: Set $\delta=\min\{1,\epsilon\}$, then $|x|\geq 2-|x-2|>2-\delta\geq 2-1=1$, then $\left|\dfrac{1}{x}-\dfrac{1}{2}\right|=\dfrac{|x-2|}{2|x|}<\dfrac{|x-2|}{2}\leq|x-2|<\delta\leq \epsilon$.
A: Note:
$$|x-2|<\delta \Rightarrow 0<2-\delta<x<2+\delta.$$
Now:
$$\big{|} \frac{1}{x}-\frac12 \big{|} =\big{|}
\frac{x-2}{2x}\big{|}<\frac{\delta}{2(2-\delta)}=\epsilon \Rightarrow \delta=\frac{4\epsilon}{1+2\epsilon}.$$
A: No, it is not okay if your $\delta$ depends on $x$. It can depend on $x_0$, in your case $x_0 = \dfrac{1}{2}$.
But why do you need a $\delta$ or do you want to proof continuity? 
