# Examples of $f \in C^2[a,b]$ where the total variation of $f$ on $[a,x]$ is not in $C^2[a,b]$

Suppose $f:[a,b]\to\mathbb{R}$ is of bounded variation; define $V(x) = V[f;a,x]$ (the total variation of $f$ on $[a,x]$.

I want to show that $V \in C^1[a,b]$. Since $f'$ is continuous, hence bounded on $[a,b]$ I have that $f$ is absolutely continuous. From that I have $V' = |f'|$, and since $f'$ is continuous, $|f'| = V'$ must be as well, correct?

If instead $f \in C^2[a,b]$, I'm looking for an example $f$ where $V \not\in C^2[a,b]$. From the above result, I think that means I should be looking for an $f$ where $f''$ is continuous but $|f'|'$ is not.

Thanks for any examples and/or suggestions on how to construct such an $f$.

-
It's not a homework, I'm working problems in preparation for a test. My (perhaps faulty) reasoning was this: if $f \in C^1$, then $V'' = (\frac{d}{dx}\int_a^x f'(t)dt)' = f''$ so $V''$ would also be $C^2$. Hopefully this betrays some error or misunderstanding of mine that may be corrected. – bosmacs Aug 31 '13 at 21:06
en.wikipedia.org/wiki/… – Alexey Aug 31 '13 at 21:20
I see. I sloppily dropped the abs. value. So $V[f;a,x] = \int_a^x |f'|$ would be correct. – bosmacs Aug 31 '13 at 21:22
Agreed. Let me revise the question to deal with the first part as ell... – bosmacs Aug 31 '13 at 21:25
With the absolute value this would be correct (as in Wikipedia). I could give you an example of a function you asked about, but i prefer to let you revise the definitions first, sorry. It makes no sense to give an answer before the question is fully understood. – Alexey Aug 31 '13 at 21:25

How about $x\mapsto x^2$ on $[-1,1]$?
I think $f(x) = \frac{1}{2}x^2 - x$ on $[0,2]$ would do the trick. Then $f'(x) = x-1$, $f''(x) = 1$ so $f \in C^2$. But $|f'|' = \pm 1$ on $[0,1)$ and $(1,2]$ respectively, so $|f'|' = V''$ is not continuous.