Functions of Bounded and Unbounded Variations I have two questions, I would like to  be helped in. Here they are:


*

*Show that
$$f(x) = \begin{cases} x^2\sin\left(\frac{1}{x^2}\right) &\mbox{if } x \neq 0\\
0 & \mbox{if } x = 0. \end{cases} $$
is not of bounded variation on $[-1,1]$.

*Show that $$f(x) = \begin{cases} x^2\sin\left(\frac{1}{x}\right) &\mbox{if } x \neq 0\\
0 & \mbox{if } x = 0. \end{cases} $$ 
is of bounded variation on $[-1,1]$.  

My Attempt. (for 2.) 
Let $g(x) = x^2\sin\left(\frac{1}{x}\right) + 2x~~~;~~h(x) = 2x$. Then both $g(x)$ and $h(x)$ are increasing (by the derivative test) on $[-1,1]$. Since $f(x) = g(x) - h(x)$, $f$ is of bounded variation on $[-1,1]$.  
Is my attempt for (2) okay? For (1) I know I have to show that the total variation of $f$ is unbounded, but I don't how to do that. Any suggestions?
Thanks.
 A: Here's an intuitive way of thinking about the problem.
(1) The $x^2$ on the outside causes the function to vanish rapidly, but the $1/x^2$ inside the sine function causes the oscillation to be similarly rapid. This balance turns out to be just enough to produce unbounded variation, as the variation behaves similarly to the harmonic series. How so?
It will suffice to consider the interval $[0,1]$. $\sin(1/{x}^2)= 0$ when 
\begin{equation}x =  \frac{1}{\sqrt{\pi n}}\end{equation}
and $\sin(1/x^2) = 1$ when
\begin{equation}x =  \frac{\sqrt{2/\pi}}{\sqrt{4n+1}}\end{equation} 
(in both cases, make sure that the denominators are not zero)
Now, "throw" these points into a partition. In other words, create a sequence of partitions containing these values for greater and greater $n$. Now, compute the variation. For the points of the form
\begin{equation}x =  \frac{1}{\sqrt{\pi n}}\end{equation}
the entire expression vanishes. Thus the variation just becomes the summation of $x^2$ at points of the form
\begin{equation}x =  \frac{\sqrt{2/\pi}}{\sqrt{4n+1}}\end{equation} 
which is
\begin{equation}x = \sum_{n=n_{0}}^{k} \frac{2/\pi}{4n+1}\end{equation} 
which, like the harmonic series, diverges as $k \to \infty$. 
(2) In this case, the function vanishes at a speed faster than which it oscillates. This will give us bounded variation, in the form similar to that of the convergent sum $\sum 1/n^2$.
It will suffice to consider the interval $[0,1]$, as the mirror case is identical.
$\sin(1/x)= 0$ when
\begin{equation}x =  \frac{1}{\pi n}\end{equation}
and $\sin(1/x) = 1$ when
\begin{equation}x =  \frac{2}{\pi (4n+1)}\end{equation}
again making sure that the denominator is nonzero. Using the same technique as before, we construct a sequence of partitions where the $\sin(1/x)$ term either vanishes or equals one. The variation (of a particular partition in the sequence) is then the following sum
\begin{equation}x =  \sum_{n=n_{0}}^{k} \frac{4}{\pi^2 (4n+1)^2}\end{equation}
which converges as $k \to \infty$ like $\sum 1/n^2$.
This technique can be extended to the "general" case of $x^{k}\sin(1/x^{n})$ very easily, and provides an interesting parallel between the vanishing/oscillation speeds of this function, and summations of the form $\sum 1/x^{m}$.
A: Consider $f(x) = x^2 \sin\left( \frac{1}{x}\right)$ for $x\not=0$ first. Due to parity of the function, i.e. $f(-x) = -f(x)$, it is sufficient to determine the finiteness of its total variation on $(0,1)$ interval.
$$
  \operatorname{T.V.}(f) = \int_0^1 \left\vert f^\prime(x) \right\vert \mathrm{d}x \stackrel{u=\frac{1}{x}}{=} \int_1^\infty \frac{\vert \cos(u) - \frac{2 \sin(u)}{u} \vert}{u^2} \mathrm{d} u \le \int_1^\infty \frac{\mathrm{d} u}{u^2} = 1 
$$

Repeat the same for $g(x) = x^2 \sin\left( \frac{1}{x^2}\right)$:
$$
\operatorname{T.V.}(g) = \int_0^1 \left\vert g^\prime(x) \right\vert 
   \mathrm{d}x \stackrel{u=x^{-2}}{=} \int_1^\infty \frac{\vert  \cos(u) - \frac{\sin(u)}{u} \vert}{u} \mathrm{d} u
$$
The above integral actually diverges, which can be seen from divergence of $\sum_n \frac{1}{u_n}$, where $u_n$ are zeros of $u \cos(u) - \sin(u)$. 
