Decide whether they can be written as the difference of two monotonically increasing functions Decide for the following functions $f : \mathbb{R} \to \mathbb{R}$, whether they can be written as the difference of two monotonically increasing functions:
a) $f(x)=sin(x)$
b) $f(x)= \left\{\begin{matrix}
x^2sin(\frac{1}{x}) & if &x\neq 0 \\ 
 0 & if  & x=0
\end{matrix}\right.$
I just need any hint for this exercise.
 A: Hint: Cut $\mathbb{R}$ in two parts: the intervals on which $\sin$ is monotically increasing and decreasing. You want to express $\sin$ as a sum of an increasing and a decreasing function, so it will be interesting to add a contribution to the increasing (resp. decreasing) function only on the increasing (resp. decreasing) intervals.
For (b), you just have to avoid the problem in $0$ by starting from an other point.
A: A function of "bounded variation" means that $sup \sum_{j=1}^{n} |f(x_j)-f(x_{j+1})|\leq M$. Intuitively, it means the function does not go above or below some constant $M$
If a function has bounded variation on $[a,b]$ then it can be written as a difference of two positive monotone functions. 
for a) we clearly have $f:[a,b]\rightarrow \mathbb{R}$ with $f(x)=sin(x)$ is of bounded variation. Note that $sin(x)$ is of bounded variation everywhere on the real line, so in particular, we can choose any arbitrary interval $[a,b]$. They exist, I just am not seeing an obvious pair of monotone functions to show an example. 
for b) if we consider $f:\mathbb{R}\rightarrow \mathbb{R}$, it is possible. We can define two monotone, periodic functions on $[a,b]$ with increasing amplitude, we can probably find an explicit one with some work. 
