Given a function $f:[a,b]\rightarrow\mathbb{R}$, we define the variation of $f$ on $[a,b]$ as follows:
\begin{equation*} V_a^b(f)=\sup\left\{\sum_{i=1}^{n}{|f(t_i)-f(t_{i-1})|}\middle|P=\{t_i\}_{i=0}^n\in\mathscr{P}([a,b])\right\}. \end{equation*}
where $\mathscr{P}([a,b])$ denotes the set of partitions of the interval $[a,b]$. It's very easy to generalised this definition when the codomain is a metric space $(X,d)$. It's enough to substitute $|f(t_i)-f(t_{i-1})|$ by $d(f(t_i),f(t_{i-1}))$. We say that $f$ is a function of bounded variation if $V_a^b(f)<+\infty$.
I need to learn about functions of bounded variations defined on an open set of $\mathbb{R}^n$. Given a function $f\in\mathcal{L}^1(U,\mathbb{R})$, we define the variation of $f$ on $U$ as follows:
\begin{equation*} V_U(f)=\sup\left\{\int_{U}{f(x)\cdot\text{div}(\varphi)(x)\,dx}\middle|\varphi\in\mathcal{C}_c^1(U,\mathbb{R}),|\varphi|\leq 1\text{ on $U$}\right\}. \end{equation*}
I don't understand why this is the natural definition. Could anyone explain how to get to this definition in a natural way?