4. Find the minimum value of the function $f(x)=\sum_{i=1}^{2011}|i x-1|$.

 untranslated text remains unchanged.
Hint: Using Conclusion 1 or Conclusion 2, it can be deduced that $f(x)$ achieves its minimum value $\frac{592043}{711}$ if and only if $x=\frac{1}{1422}$.