Question is :

What I have read in Riemann sum definition is something like $$\sum_{i=1}^n f(y) .|x_i-x_{i-1}|$$
So, at first sight i am afraid this is not even related to Riemann integration of $f$ and then I got something like :
$|f(x_i)-f(x_{i-1})|$ being seen as $$\frac{|f(x_i)-f(x_{i-1})|}{|(x_i-x_{i-1})|}.|(x_i-x_{i-1})|$$
and this is same as $$f'(y_i) |x_i-x_{i-1}|\text{for some $y_i \in (x_{i-1}, x_i)$}$$
So, I would now be left with
$$S(P)=\sum_{i=1}^n |f(x_i)-f(x_{i-1})|=\sum_{i=1}^n\frac{|f(x_i)-f(x_{i-1})|}{|(x_i-x_{i-1})|}.|(x_i-x_{i-1})|=\sum_{i=1}^nf'(y_i) |x_i-x_{i-1}|$$
and i see this is Riemann sum for $f'(x)$ on $[0,1]$
So, I would like to say that $$S(P)= \int_{0}^1 |f'(x)|$$
I am brand new for this Riemann integration problems (this might be third of fourth problem i have tried in this topic).
So, I would be thankful if some one can assure my reasons for this problem are correct and precise.
Thank you