For a function $f:[0,1]\to\mathbb{R}$, define
$$ V(f)=\sup\_{0=x\_0<x\_1<\ldots<x\_n=1}\sum\_{i=1}^{n}|f(x\_n)-f(x\_{n-1})|.
$$
For $f$ with integrable derivative, the definition coincides with
$V(f)=\int\_0^1|f'(x)|dx$.


Now every continuous $f:[0,1]\to\mathbb{R}$ is uniformly approximable by a $C^\infty$ function (Weierstrass); denote by $C\_{\epsilon}(f)$ the collection of all $g\in C^\infty[0,1]$ such that $\sup\_{x\in[0,1]}|f(x)-g(x)|\le\epsilon$.


I conjecture that for every *continuous* $f:[0,1]\to\mathbb{R}$, we have
$$
V(f) = \limsup\_{\epsilon\to0}\inf\_{g\in C\_\epsilon(f)}V(g).
$$


Is this true? Known?



Characterization of bounded variation
This is quite simple: if $\|f - g\|\_\infty \leqslant \epsilon$, then clearly
$$ \sum\_{i = 1}^n |f(x\_i) - f(x\_{i-1})| \leqslant \sum\_{i = 1}^n |g(x\_i) - g(x\_{i-1})| + 2 n \epsilon \leqslant V(g) + 2 n \epsilon.$$
Therefore,
$$ \sum\_{i = 1}^n |f(x\_i) - f(x\_{i-1})| \leqslant \inf\_{g \in C\_\epsilon(f)} V(g) + 2 n \epsilon,$$
and consequently
$$ \sum\_{i = 1}^n |f(x\_i) - f(x\_{i-1})| \leqslant \liminf\_{\epsilon \to 0^+} \inf\_{g \in C\_\epsilon(f)} V(g) .$$
Take the supremum over all possible partitions to get
$$ V(f) \leqslant \liminf\_{\epsilon \to 0^+} \inf\_{g \in C\_\epsilon(f)} V(g) .$$


*EDIT: I forgot about the converse inequality:*


On the other hand, $f$ can be approximated by functions from $C\_\epsilon(f)$ in the total variation norm (see below), so that
$$ V(f) \geqslant \inf\_{g \in C\_\epsilon(f)} V(g) , $$
and hence
$$ V(f) \geqslant \limsup\_{\epsilon \to 0^+} \inf\_{g \in C\_\epsilon(f)} V(g) . $$


Regarding approximation: if $f$ is non-decreasing, then there is a smooth function $g \in C\_\epsilon(f)$ such that $V(g) \leqslant V(f)$ (just mollify $f$ appropriately). In the general case, if $V(f) < \infty$, then $f = f\_+ - f\_-$ with $f\_+$ and $f\_-$ non-decreasing and $V(f) = V(f\_+) + V(f\_-)$. Find $g\_+$ and $g\_-$ as above; then $g = g\_+ - g\_-$ is in $C\_{2\epsilon}(f)$, and $$V(g) \leqslant V(g\_+) + V(g\_-) \leqslant V(f\_+) + V(f\_-) = V(f).$$


