Computing the total variation of a function $f:[0,1] \to \mathbb{R}$ using uniform partitions
Let $f:[0,1] \to \mathbb{R}$ be a function of bounded variation and let
$$ V_0^1(f) = \sup \{ \ \sum_{i=1}^{N-1} |f(x_i)-f(x_{i+1})| : 0<x_1 < \cdots < x_N < 1 \ \} $$
be its total variation where the supremum runs over all partitions of $[0,1]$.
Can we caculate the $V_0^1(f)$ using uniform partitions? That means we set $$ x_i = \frac{i-1}{N-1}, \ \ i=1, \dots,N $$ and $$ v_N = \sum_{i=1}^{N-1} |f(x_i)-f(x_{i+1})|. $$ Does the sequnce $(v_N)_N$ converges to $V_0^1(f)$ (maybe under stronger conditions such as continuity of $f$) ?
If $f$ is continuous then $\lim_{N \to \infty} v_N = V_0^1(f)$. If $f$ is not continuous then this is not necessarily true.
For proof, let $f:[a,b] \to \mathbb{R}$ be of bounded variation with total variation $V_a^b(f)$ and for an arbitrary partition $P$ with points $a= x_0 < x_1 < \ldots < x_n = b$, denote the variation with respect to the partition as
$$V(f,P) = \sum_{k=1}^n |\,f(x_k) - f(x_{k-1})\,|$$
Relating to your notation, if $P_N$ is a uniform partition then $V(f,P_N) = v_N.$
For any $\epsilon > 0$ there exists a partition $P'$ with points $a= x_0' < x_1'< \ldots < x_m' = b$ such that
$$V_a^b(f) - \frac{\epsilon}{2} < V(f,P') \leqslant V_a^b(f)$$
Since $f$ is uniformly continuous on the compact interval $[a,b]$, there exists $\delta > 0$ such that if $|x-y| < \delta$ , then $|f(x) - f(y)| < \epsilon/ (4m)$.
Take another partition $P''$ with points $a= x''_0 < x''_1 < \ldots < x''_n = b$ and with partition norm $\|P''\| < \delta$, i.e. $\max_{1 \leqslant k \leqslant n} |x_k - x_{k-1}| < \delta$. Let $P = P'\cup P''$ be the common refinement. We then have $\|P \| < \delta$ and
$$V(f,P') \leqslant V(f,P),\quad V(f,P'') \leqslant V(f,P)$$
The partition $P$ is formed by adding $m$ points from $P'$ to $P''$. Some of these may coincide with points of $P''$, but at most $m$ new points could be introduced. As a consequence we have
$$\tag{*}V(f,P'') \geqslant V(f,P) - \frac{\epsilon}{2}$$
To see why, notice that if the point $x_k'$ from $P'$ falls between $x_j''$ and $x_{j+1}''$, then the contribution to the variation of the refined partition increases from $|f(x_{j+1}'') - f(x_j'')|$ to $|f(x_{j+1}'') - f(x_k')| + |f(x_k') - f(x_j'')|$ since the second quantity exceeds the first by the triangle inequality. However, since $\|P\| < \delta$ the increase is at most $$|f(x_{j+1}'') - f(x_k')| + |f(x_k') - f(x_j'')| -|f(x_{j+1}'') - f(x_j'')| \\\leqslant |f(x_{j+1}'') - f(x_k')| + |f(x_k') - f(x_j'')| \leqslant 2 \frac{\epsilon}{4m},$$
As this can occur at most for $m$ points, the inequality (*) follows.
Thus,
$$V_a^b(f) \geqslant V(f,P'') \geqslant V(f,P) - \frac{\epsilon}{2} \geqslant V(f,P') - \frac{\epsilon}{2} \geqslant V_a^b(f) - \epsilon. $$
This proves that $V(f,P'') \to V_a^b(f)$ as $\|P''\| \to 0$.
This is a complement to the excellent answer by user RRL. I present a counter-example to show that continuity is essential for the result (proved in other answer) to hold.
Let $f:[a, b] \to\mathbb {R} $ be a function which is continuous and strictly increasing on $[a, b] $ and let $c\in(a, b) $. And consider another function $g:[a, b] \to\mathbb {R} $ such that $f(x) =g(x) $ for all $x\in[a, b]\setminus \{c\} $ and $f(c) \neq g(c) $. Then $g$ has a removable discontinuity at $c$ and is continuous at all other points of $[a, b] $.
It should be easy to observe that both $f, g$ are of bounded variation and $$V_a^b(g) =V_a^b(f) +2|f(c)-g(c)|$$ The relation above should be obvious if one takes a partition which includes point $c$. Points close to $c$ and left of $c$ will lead to a term $|f(c) - g(c) | $ in the total variation for $g$ and similar is the case for points near and to the right of $c$.
Next note that if we try to find the limit of sum $$V(g, P) =\sum_{k=1}^{n}|g(x_k)-g(x_{k-1})|$$ corresponding to partition $$P=\{x_0,x_1,x_2,\dots,x_n\}$$ as norm of partition $P$ tends to $0$ then depending on whether the partition contains $c$ (or not) the limit will (or will not) include the extra $2|f(c)-g(c)|$ and thus the limit does not exist (one can say it oscillates finitely with two limit points $V_a^b(f) $ and $V_a^b(f) +2|f(c)-g(c)|$).
Hence we must ensure continuity of a function before we can use the limit via norm approaching $0$ to find total variation of the function.
This is one of the cases where the limit using norm of partition and limit using refinement of partition differ.
The above counter-example is given as a hint in the lecture notes by Christopher Heil. See Exercise 19 (the exercise has a typo as it is supposed to find the counter-example to theorem 17 and not theorem 18 as mentioned). IMHO the lecture notes are good and would be worth going through.