Two definitions of "Bounded Variation Function" As far as I know, a function $f$ defined on an interval $[a, b]$ is said to be of bounded variation if 
$$\tag{1}V_a^b(f)=\sup\left\{\sum_{P} \lvert f(x_{j+1})-f(x_j)\rvert \ :\ P\ \text{partition of }[a, b]\right\}<\infty.$$
Today I discovered that another definition is in use for a function defined in an open subset $\Omega$ of $\mathbb{R}^n$, namely (cfr. Wikipedia) we say that $f$ is of bounded variation if
$$\tag{2}V(f; \Omega)=\sup\left\{ \int_{\Omega}f(x)\,\text{div}\,\phi (x)\, dx\ :\ \phi\in C^1_c(\Omega),\ \lVert \phi\rVert_{\infty}\le 1 \right\}<\infty.$$
Even if the cited Wikipedia article treats the two definitions as if they were equivalent when $\Omega=(a, b)$, this does not seem to me to be the case. The Dirichlet function $\chi_{\mathbb{Q}\cap [0, 1]}$ is not of bounded variation in $(0, 1)$ in the sense of definition (1) but it is in the sense of definition (2). 

Question. What is the precise relationship between the two definitions?

Thank you for reading. 
 A: The book A First Course in Sobolev Spaces by Giovanni Leoni is a very helpful resource for calculus aspects of function spaces. The first seven chapters deal with functions of one real variable. Chapter 2 is called "Functions of Bounded Pointwise Variation" which are defined by (1) and this class is denoted $BPV(I)$, rather than $BV(I)$. Here $I$ is the interval of definition. The author comments in a footnote on pp.39-40: 

Although we do not like changing standard notation, unfortunately in the literature the notation $BV(I)$ is also used for a quite different (although strictly related) function space. This book studies both spaces, so we really had to change the notation for one of them.

Section 7.1 is titled "$BV(\Omega)$ Versus $BPV(\Omega)$". Here, $\Omega$ is an open subset of $\mathbb R$ (we are still in one dimension), and $BV(\Omega)$ is defined as the class of integrable functions $u\in L^1(\Omega)$ for which there is a finite signed Radon measure $\lambda$ such that $\int u\varphi'=-\int \varphi\,d\lambda$ for all $\phi\in C_c^1(\Omega)$. This is somewhat different from, but equivalent to (2): one direction is trivial and the other is a form of Riesz representation.

Theorem 7.2. Let $\Omega\subset\mathbb R$ be an open set. If $u:\Omega\to\mathbb R$ is integrable and if it belongs to $BPV(\Omega)$, then $u\in BV(\Omega)$ and 
  $$|Du|(\Omega)\le \operatorname{Var}u$$
  Conversely, if $u\in BV(\Omega)$, then $u$ admits a right continuous representative $\bar u$ in $BPV(\Omega)$ such that 
  $$ \operatorname{Var}\bar u = |Du|(\Omega)$$

This is proved thoroughly indeed; the proof takes three pages (pp. 216-218). 
