Confirmation on a monotonicity formula? After a long series of difficult problems (which are completely irrelevant) I found myself experimenting with a way to convert a graphed function to a purely monotonic form (I hope I didn't butcher that terminology).
I was thinking that if I took a function's derivative and then it's absolute value, and then integrated I would receive a monotonic version as the derivative no longer has any points where it is less than zero.
In other words I would like to know if the following is true:
$\int abs(\frac d{dx}f(x))$ will return a version of f(x) where all decreases in the x direction have become increases, for all f(x) that have a defined graph.
I get the weird feeling that piecewise notation is needed for the negative side of the x-axis, but it might be correct.
I would also like to know if this in any way distorts f(x) or if it merely mirrors certain portions symmetrically as one would expect when negating a graph, or a portion of a graph. I'm not entirely sure how to describe "distorting", but it's the sort of thing where you'll know it when you see it.
 A: Suppose (for technical simplicity) that $f$ is continuously-differentiable in some interval $I$. Fix a point $a$ in $I$, and define the continuously-differentiable function
$$
g(x) = f(a) + \int_{a}^{x} |f'(t)|\, dt,\quad x \in I,
$$
as in Akiva Weinberger's comment.
The fundamental theorem of calculus gives $g(a) = f(a)$ and
$$
g'(x) = |f'(x)|
  = \begin{cases}
     \phantom{-}f'(x) & f(x) \geq 0, \\
    -f'(x) & f(x) < 0.
  \end{cases}
\tag{1}
$$
Because we're assuming $f'$ is continuous, the set of points where $f' \neq 0$ is open, and hence a disjoint union of maximal open intervals on which the sign of $f'$ does not change. In words, (1) guarantees


*

*The difference $g(x) - f(x)$ is constant on each open interval $J_{+}$ where $f' > 0$. Geometrically, the graphs of $f$ and $g$ over each such interval $J_{+}$ are congruent under some vertical translation.

*The difference $g(x) + f(x) = g(x) - (-f(x))$ is constant on each open interval $J_{-}$ where $f' < 0$. Geometrically, the graphs of $-f$ and $g$ over each such interval $J_{-}$ are congruent under some vertical translation.
In each case, "there is no distortion".
