Finding max of value of Blancmange curve on closed interval Let $h(x) = |x|$ on $[-1,1]$ and extend the definition of $h$ to all of $\mathbb{R}$ by requiring $h(x+2)=h(x)$. The result is a periodic "sawtooth" function. Let
$$g(x) = \sum_{n=0}^\infty \frac{1}{2^n}h(2^n x). $$

If possible, how do we find the/a value at which $g$ attains its maximum in the interval [0,2]? Furthermore, is the set of points where $g$ attains its maximum in the interval [0,2] finite/countable/uncountable?

I think we can rule out the rationals $\{1, \frac12, \frac14, \frac34, 
\frac18, \frac38, \frac58, \frac78, \ldots \}$ since $h(2^n x)=0$ at these values for all $n$ greater than some $N$.
Apart from that, I'm not sure what I can say. I tried constructing a sequence of maximums, but the behavior seems erratic and I don't think it will lead anywhere? This is from the second edition of Abbott (section 5.4) btw.

 A: I split my head over this, but eventually, I found the maximum by splitting the problem in two substeps:

*

*Find a suitable bound for $g$, which I found to be $4/3$.

*Find $y\in\mathbb{R}$ where $g(y)=4/3$. I found that $g(\frac{2}{3})=\frac{4}{3}$.

Proof: For (1), the strategy is to look at the $g_{2m-1}$, where $m\geq 1$, and to show that
$$\max (g_{2m-1})\leq \sum_{i=1}^{m}\frac{1}{4^{i-1}}=1+\frac{1}{4}+\cdots+\frac{1}{4^{m-1}}$$
Consider $g_1=h_0+h_1$. Graphing $h_0+h_1$ should convince you that its maximum value is 1, so the base case holds. Next, we take our inductive hypothesis to be that
$$g_{2m-1}\leq \sum_{i=1}^{m}\frac{1}{4^{i-1}}$$
and to show that it holds for $m+1$. Note that
$$g_{2(m+1)-1}=g_{2m+1}=g_{2m-1}+h_{2m}+h_{2m+1}$$
An argument similar to the one for h_0+h_1 should convince you that $h_{2m}+h_{2m+1} $is bounded by $1/2^{2m}=1/4^m$. To get you started, note that it's enough to look at the interval $[0, 1/2^{2m-1}]$ where $h_{2m}$ does one full oscillation. Once you're convinced of that, we can use that to conclude that
$$\max(g_{2m+1})\leq \max(g_{2m-1})+\max(h_{2m}+h_{2m+1})\leq \sum_{i=1}^{m}\frac{1}{4^{i-1}}+\frac{1}{4^m}=\sum_{i=1}^{m+1}\frac{1}{4^{i-1}},$$
which proves the claim. Now we can conclude that
$$\lim_{m\to\infty}\max(g_{2m-1})\leq \sum_{i=1}^{\infty}\frac{1}{4^{i-1}}=\frac{4}{3}$$
From here you can justify to yourself that this implies $g(x)\leq 4/3$. $\square$
Proof of (2): As a preliminary, we first need to show that
$$h\left(2^n\cdot\frac{2}{3}\right)=\frac{2}{3}$$
We make use of that fact that $h(x)=2/3$ in $[0, 2]$ only when $x=2/3$ or $x=4/3$, and the fact that $h(x+2)=h(x)$. For the base case, note that
$$h\left(2^0\frac{2}{3}\right)=h\left(\frac{2}{3}\right)=\frac{2}{3}$$
since $h(x)=x$ on $[0, 1]$. For the inductive case, we assume that
$$h\left(2^n\cdot\frac{2}{3}\right)=2/3$$
Because of the periodic nature of $h$, this implies that either there is $a\in\mathbb{Z}$ such that
$$2^n\cdot\frac{2}{3}+a=\frac{2}{3}$$
or there is $b\in\mathbb{Z}$ such that
$$2^n\cdot\frac{2}{3}+b=\frac{4}{3}$$.
Without loss of generality, we assume it's the case with $a$. Then we multiply the equation on both sides by 2 and rearrange to get:
$$2^{n+1}\cdot\frac{2}{3}=\frac{4}{3}-2a$$
Using the periodic nature of $h$, we know get
$$h\left(2^{n+1}\cdot\frac{2}{3}\right)=h\left(\frac{4}{3}-2a\right)=h\left(\frac{4}{3}\right)=\frac{2}{3}$$
Now we can use this result to show that $g(2/3)=4/3$:
$$g\left(\frac{2}{3}\right)=\sum_{m=0}^{\infty}\frac{1}{2^m}h\left(2^m\cdot\frac{2}{3}\right)=\frac{2}{3}\sum_{m=0}^{\infty}\frac{1}{2^m}=\frac{2}{3}\cdot 2=\frac{4}{3}\square$$
