The total variation of differentiable function $f$ on the closed interval $[a,b]\subset\mathbb{R}$ is given by $$V_a^b(f)=\int_a^b|f'(x)|dx.$$ Does the same formula hold for the total variation of differentiable function on $\mathbb{R}$, i.e., can we say that the total variation of a function on $\mathbb{R}$ is equal to $\int_\mathbb{R}|f'(x)|dx$ (given that the last integral is finite)?
If the formula indeed holds, is there any book or other reference where it is proved?
Almost all the sources that I have checked deal with the variation on finite intervals paying almost no attention to variations on $\mathbb{R}$.