The function $f:[0;1]\rightarrow\mathbb{R}$ is defined by $f(x):= \inf\{|nx-1|:n\in\mathbb{N}\}$.$\:$Show that $f$ is continuous on $(0;1]$.
First of all I'm not sure if I fully understand the function. $\:$We fix one "$x_0$" and then multiply it by every "$n$" there exists. $\:$We do that for every "$x$" in $[0;1]$.$\:$ Is it correct that the infimum is always $0$?$\:$ x is most of the time a fraction. $\:$There is always one time when "$n$" and "$x$" are inverse to each other. $\:$For example $x = \frac{1}{2}$. Then for $n=2$ we have $2*\frac{1}{2}-1 = 0$. $\:$For $x=\frac{1}{3}$ and $n=3$ $\implies 3*\frac{1}{3}-1 = 0$ and so on. $\:$So the infimum always becomes $0$. Now how to I cover the spots between the rationals?$\:$ Just apply the Intermediate value theorem or what would be the best way to do it?
Thanks in advance
Not at all. Either $f(x) = -1$ or $f(x) = x - 1$ for all $x$, depending on whether you have 0 in your $\mathbb{N}$ or not.
Really? What if $x = \pi$? Or $x = \frac{2}{3}$, for that matter?
Real numbers below 0 exist.
You haven't proven that your function is continuous yet, so no. Also, the rationals are rather irrelevant, for both of the reasons noted above.
Given what $f$ is, it's trivial to show that it's continuous: either it's constant, or it differs from the identity by a constant, and both of those are very simple to prove to be continuous on all of [0,1]. Have you written the function down incorrectly?