Q: Variation of Dirichlet's function I am to prove that the variation of Dirichlet's function is infinite. I would really appreciate any help, because I do not know how to start.
$$f(x)= \begin{cases}
1  & \text{if $x\in\mathbb{Q}$}\\
0 & \text{if $ x \notin\mathbb{Q}$} \\
\end{cases}$$

A: Observe that since the function will wiggle uncountable infinite number of times and hence the variation when summed up will be infinite , 
Mathematically , for calculating the variation of any function over a set,
First we partition the underlying domain set and sometimes partition the subset of the domain set (as, if  we see that the variation of that function on the subset is infinite then it is clear that variation of the function over whole domain set will still be infinite).
So let us  consider a subset $A \subset [0,1]$ and  we do the partition of $A$ like this - $\{0=x_{0},x_{1},...,x_{n-1}\}$,such that $x_{i}$ is irrational if $i$ is even and $x_{i}$ is rational if $i $ is odd .  
Now for finding the variation of the above Dirichlet function on set $A$ consider the total variation $t[\{0,x_{1},...,x_{n-1}\}](f) = \sum_{i=1}^{n}|(f(x_{i}) - f(x_{i-1}))|$ .
Now since if $i$ is even then $i-1$ will be odd so we will get a sum of $1's$ $n$ times giving $t[\{0,x_{1},...,x_{n-1}\}] = n$ and when $n \rightarrow \infty$ this total variation tends to infinity .
And since this is for a subset of $[0,1]$ , so the variation of Dirichlet function on the set $[0,1]$ is infinite.
Hope this helps!
