# Help with modified Takagi functions

First, I need to give some definitions and background information:

Define $h(x)=|x|$ for $x\in [-1,1]$. Extend this function to $\mathbb R$ by defining $h(x+2) = h(x)$. Here is a graph of $h$:

Now if we define $g(x) = \sum_{n=0}^\infty {1 \over 2^n}h(2^nx)$ then $g$ is the Takagi function. One can prove that $g$ is continuous and nowhere differentiable. I did both. Continuity follows easily from the Weierstrass M-test and for non-differentiability one can first show it for dyadic points and then for non-dyadic points.

Now I am interested in two different modified versions of the Takagi function:

$$g_1(x) = \sum_{n=0}^\infty {1\over 2^n}h(3^n x)$$ and $$g_2(x) = \sum_{n=0}^\infty {1\over 3^n}h(2^n x)$$

These two are easily seen to be continuous.

Could someone please show me how to determine the differentiability of both $g_1$ and $g_2$? I really tried but failed.

• I tried to make the question shorter so that maybe people are more likely to read it. You can see my work in the revision history. – blue Jun 23 '14 at 17:15
• Although I'm rather convinced that $g_1$ is nowhere differentiable, I don't know how to prove it. For $g_2$, since $\sum \left(\frac{2}{3}\right)^n = 3 < \infty$, we see that that is Lipschitz, and hence by Rademacher's theorem differentiable almost everywhere. I expect $g_2$ is differentiable in every non-dyadic point, but haven't set out to prove it yet. – Daniel Fischer Jun 25 '14 at 9:26

I believe Daniel's conjecture, so let me do some work on $g_1(x)$. Let $c=2m/3^k$ for some integer $m$ and some positive integer $k$. I want to show that $g_1(x)$ is not differentiable at $x=c$. Define $\epsilon_a = 2/3^a$ for positive integers $a$. Let's compute $\frac{g_1(c+\epsilon_a)-g_1(c)}{\epsilon_a}$ and show the limit as $a\rightarrow \infty$ does not converge to a real number.

For any non-negative integer $n\geq a$, we have $(2)3^{n-a}$ is an even integer, so: \begin{eqnarray*} h(3^nc + 3^n\epsilon_a) - h(3^nc) &=& h(3^nc + (2)3^{n-a})-h(3^nc)\\ &=& h(3^{n}c) - h(3^nc) \\ &=& 0 \end{eqnarray*}

If $a>n\geq k$ then $2m3^{n-k}$ is an even integer, and the right-derivative of $h(x)$ at $x=2m3^{n-k}$ is $1$. Since $(2)3^{n-a}<1$, we have: \begin{eqnarray*} h(3^nc + 3^n\epsilon_a) - h(3^nc) &=& h(2m3^{n-k} + (2)3^{n-a})-h(2m3^{n-k})\\ &=& (2)3^{n-a} \end{eqnarray*}

In summary, assuming $a>k$:
\begin{eqnarray*} \frac{g_1(c+\epsilon_a)-g_1(c)}{\epsilon_a} &=& \frac{1}{\epsilon_a}\left[\sum_{n=0}^{k}\frac{1}{2^n}[h(3^nc+3^n\epsilon_a)-h(3^nc)] + \sum_{n=k+1}^{a-1}\frac{(2)3^{n-a}}{2^n}\right] \\ &\geq&\frac{1}{\epsilon_a}\left[-\sum_{n=0}^k\frac{3^n\epsilon_a}{2^n} + \sum_{n=k+1}^{a-1}\frac{(2)3^{n-a}}{2^n} \right] \\ &=& -\sum_{n=0}^k(3/2)^n + \sum_{n=k+1}^{a-1}(3/2)^n \end{eqnarray*} and the right-hand-side goes to $\infty$ as $a\rightarrow \infty$. So $g_1(x)$ is not differentiable at $x=c$.

Let $x \in \mathbb{R}$. For $n$, define $a_n,b_n \in 1/3^{n+1}.\mathbb{Z}$ as follow. If $x$ is in some interval $[\frac{2p}{3^n},\frac{2p+1}{3^n})$, put $a_n=\frac{2p}{3^n}$ and $b_n=\frac{2p+2/3}{3^n}$. If $x$ is in some interval $[\frac{2p+1}{3^n},\frac{2p+2}{3^n})$, put $a_n=\frac{2p+4/3}{3^n}$ and $b_n=\frac{2p+2}{3^n}$. In both cases $y \mapsto h(3^n y)$ is of constant slope in some interval of length $1/3^n$ containing $x,a_n,b_n$.

For $k \geq n+1$, $h(3^k a_n) =0$ and $h(3^k b_n)=0$.

For $k \leq n$, $\frac{h(3^k b_n)-h(3^k a_n)}{b_n-a_n} = \varepsilon_k(x).3^k$ where $\varepsilon_k(x)$ is the right-derivative of $h$ at $3^kx$.

Hence $$\frac{g_1(b_n)-g_1(a_n)}{b_n-a_n} = \sum_{k=0}^{n} \varepsilon_k(x) \frac{3^k}{2^k}.$$ So the sequence $(g_1(b_n)-g_1(a_n))/(b_n-a_n)$ does not converge.

Suppose that $g_1$ has derivative $\lambda$ at $x$. Write $\frac{g_1(b_n)-g_1(a_n)}{b_n-a_n}-\lambda = \left( \frac{g_1(b_n)-g_1(x)}{b_n-x} -\lambda \right) \frac{b_n-x}{b_n-a_n} + \left( \frac{g_1(x)-g_1(a_n)}{x-a_n} -\lambda\right) \frac{x-a_n}{b_n-a_n}$. This goes to zero because $\frac{b_n-x}{b_n-a_n}$ and $\frac{x-a_n}{b_n-a_n}$ is bounded.

For $g_2$. Let $x \in \mathbb{R}$. For $h>0$, write $$\frac{g_2(x+h)-g_1(x)}{h} = \sum_{k} g_k(h),$$ with $g_k(h) = \frac{h(2^k(x+h))-h(2^k x)}{3^kh}$. Since $h$ is $1$-Lipchitz, we have $\|g\|_{\infty} \leq (2/3)^k$. Moreover $\lim_{h \to 0} g_k(h) = (2/3)^k h^+(2^kx)$, where $h^+$ is the right-derivative of $h$. Hence $g_2$ has right-derivative $\sum_k (2/3)^k h^+(2^kx)$. Similary $g_2$ has left-derivative $\sum_k (2/3)^k h^-(2^kx)$. Thus $g$ has derivative at all non dyadic rationnals.

• I notice that you posted a few hours after mine, but did not give me any comments. I believe you need to consider points $a_n$, $b_n$ of the form $2m/3^n$, as in my answer, to conclude that your sum can be truncated. Do you agree? – Michael Jun 25 '14 at 19:50
• For example, you seem to claim that $h(3^kb_n)-h(3^ka_n)=0$ if $k>n$. But if $a_n=1/3^n, b_n=2/3^n$, and $k=n+1$, then $h(3^ka_n)=h(3)= 1 \neq h(3^kb_n)=h(6)=0$. – Michael Jun 25 '14 at 19:53
• I also disagree that $h(3^kb_n)-h(3^ka_n) \in \{3^k, -3^k\}$ for all $k \in \{0, \ldots, n\}$. – Michael Jun 25 '14 at 20:15
• You are right, $a_n$ should be of the form $2m/3^n$. For the other I meant $\frac{h(3^n b_n)-h(3^n a_n)}{b_n -a_n} = \pm 3^k$. – user10676 Jun 25 '14 at 20:22
• Why do you use the theorem for right-differentiable functions instead of differentiable functions? – blue Jun 26 '14 at 6:45