Q: $\delta > 0 $ so that $|f(x)-f(a)| < \epsilon$ follows for $f:D \to \mathbb{R}, x \to x+\frac{1}{x}$ Let $D:= [2,13]$ and $f:D \to \mathbb{R}, x \to x+\frac{1}{x}$
How can one determine for every $a \in D$ and $\epsilon > 0$ a $\delta > 0$ explicitly, so that for all $x \in D$ with $|x-a| < \delta$ it follows that 
$|f(x)-f(a)| < \epsilon$?
Using the triangular inequality we get that 
$$\big | x+\frac{1}{x} - x_0 - \frac{1}{x_0} \big | \leq \big | x - x_0 \big | + \big |  \frac{1}{x}- \frac{1}{x_0} \big |$$
but I don't know how to find the $\delta$ so that $|f(x)-f(a)| < \epsilon$ follows...

A: We have
$$\begin{align}
\left|f(x)-f(a)\right|&=\left|x+\frac 1x-a-\frac 1a\right| \\
&=\left|x-a-\frac{x-a}{xa}\right| \\
&=|x-a|\left|1-\frac{1}{xa}\right|
\end{align}$$
Since $x,a\in D$
$$1-\frac{1}{4}\leq 1-\frac{1}{xa}\leq1-\frac{1}{169}\\ \Rightarrow \left|1-\frac{1}{xa}\right|\leq\frac{168}{169} $$
So $\delta=\frac{169}{168}\varepsilon$ works for all $a\in D$. The fact that $\delta$ doesn't depend on $a$ means that we also have uniform continuity on $D$, as expected for a function continuous on a compact interval.
