Consider the function $$ f(x)=\sum_{n=1}^{\infty}\frac{\mathrm{sign}\left(\sin(nx)\right)}{n}\, . $$ This is a bizarre and fascinating function. A few properties of this function that SEEM to be true:
1) $f(x)$ is $2\pi$-periodic and odd around $\pi$.
2) $\lim_{x\rightarrow \pi_-} f(x) = \ln 2$. (Can be proven by letting $x = \pi-\epsilon$, expanding the sine function, and taking the limit as $\epsilon\rightarrow 0$.)
3) $\int_0^{\pi}dx\, f(x) = \frac{\pi^3}{8}$ (Can be "proven" by integrating each $\mathrm{sign}\left(\sin(nx)\right)$ term separately. Side question: Is such a procedure on this jumpy function even meaningful?)
All of this despite the fact that I can't really prove that this function converges anywhere other than when $x$ is a multiple of $\pi$!
A graph of this function (e.g. in Mathematica) reveals an amazing fractal shape. My question: What is the fractal dimension of the graph of this function? Does the answer depend on which definition of fractal dimension we use (box dimension, similarity dimension, ...)?
This question doesn't come from anywhere other than from my desire to see if an answer exists.
As requested, a plot of this function on the range $x\in[0,2\pi]$:
Other, perhaps more immediate, questions about this function:
1) Does it converge? Conjecture: It converges whenever $x/\pi$ is irrational, but doesn't necessarily diverge if $x/\pi$ is rational. See, e.g., $x = \pi$, where it converges to zero, and apparently to $\pm \ln 2$ on either side of $x = \pi$.
2) I would guess that it diverges as $x\rightarrow 0_+$. How does it diverge there? If this really is a fractal function, I would suppose that the set of points where it diverges is dense. For instance, it appears to have a divergence at $x = 2\pi/3$.
Edit 2:
Another thing that's pretty straightforward to prove is that: $$ \lim_{x\rightarrow {\frac{\pi}{2}}_-} f(x) = \frac{\pi}{4} + \frac{\ln 2}{2} $$ and $$ \lim_{x\rightarrow {\frac{\pi}{2}}_+} f(x) = \frac{\pi}{4} - \frac{\ln 2}{2} $$
Final Edit:
I realize now that the initial question about this function - what is its fractal dimension - is (to use a technical term) very silly. There are much more immediate and relevant question, e.g. about convergence, etc. I've already selected one of the answers below as answering a number of these questions.
One final point, for anyone who stumbles on this post in the future. The term $\mathrm{sign}(\sin(nx))$ is actually a square wave, and so we can use the usual Fourier series of a square wave to derive an alternate way of expressing this function: $$ f(x)=\sum_{n=1}^{\infty}\frac{\mathrm{sign}\left(\sin(nx)\right)}{n} = \frac{4}{\pi}\sum_{n=1}^{\infty}\sum_{m=1}^{\infty} \frac{\sin(n(2m-1)x)}{n(2m-1)} $$ By switching the order of the sums and doing the $n$ sum first, this could also be represented as a weighted sum of sawtooth waves.


