# Question about Riemann integral and total variation [closed]

Let $g$ be Riemann integrable on $[a,b]$, $f(x)=\int_a^xg(t)dt$ for $x∈[a,b]$.

How to show that the total variation of $f$ is equal to $∫_a^b|g(x)|dx$?

-
I think it's good to mention that this is also posted on Math SE: math.stackexchange.com/questions/150579/… –  Dylan Moreland May 31 '12 at 5:58
But all the Answers on SE have bug. –  Leitingok May 31 '12 at 6:07