Real analytic $f$ satisfying $f(2x)=f(x-1/4)+f(x+1/4)$ on $(-1/2,1/2)$ What are the real analytic functions $f\colon (-\frac{1}{2},\frac{1}{2}) \to \mathbb{C}$ that satisfy the following functional equation, and how are they derived?
$$f(2x)=f(x-\frac{1}{4})+f(x+\frac{1}{4})\quad\text{for }x \in (-\frac{1}{4},\frac{1}{4})$$
I think this could be interesting because in addition to the obvious solutions $f(x)=zx$, this is also satisfied by $f(x)=\ln (2\cos(\pi x))$.
Note: The question of which continuous functions satisfy this property has been answered (and for $f \in \mathcal{C}^n$ see the comments to the answers there); however, the restriction on functions in that case is rather weak, and it is not at all clear to me how to characterize the real analytic solutions of this fuctional equation.
 A: case 1.  $f'$ extends continuously to $[-1/2,1/2]$ (or, more generally, $f'$ is Riemann integrable on $[-1/2,1/2]$).
Take identity $f(2x) = f(x-1/4)+f(x+1/4)$, $-1/4<x<1/4$, differentiate it to get $2f'(2x) = f'(x-1/4)+f'(x-1/4)$, $-1/4 < x < 1/4$ or:
$$
f'(x) = \frac{1}{2}\;f'\left(\frac{x}{2}-\frac{1}{4}\right)
+\frac{1}{2}\;f'\left(\frac{x}{2}+\frac{1}{4}\right) ,\qquad 
\frac{-1}{2} < x < \frac{1}{2} .
\tag{1}
$$
Apply (1) to each of the terms on the right to get
$$
f'(x) = \frac{1}{4}\;f'\left(\frac{x}{4}-\frac{3}{8}\right)
+\frac{1}{4}\;f'\left(\frac{x}{4}-\frac{1}{8}\right)
+\frac{1}{4}\;f'\left(\frac{x}{4}+\frac{1}{8}\right)
+\frac{1}{4}\;f'\left(\frac{x}{4}+\frac{3}{8}\right) .
$$
and by induction, for any $k$,
$$
f'(x) = \frac{1}{2^k}\sum_{j=1}^{2^k}
f'\left(\frac{x}{2^k}+\frac{-1-2^k+2j}{2^{k+1}}\right)
\tag{2}$$
Now the right-hand side in (2) is a Riemann sum for the integral $\int_{-1/2}^{1/2} f'(t)\,dt$.  Using a partition of $2^k$ equal size subintervals, we evaluate at one point in each of the subintervals.  
Since we assumed $f'$ is Riemann integrable on $[-1/2,1/2]$, we may take the limit in (2) to conclude that $f'(x)$ is constant.  Therefore $f(x) = ax+b$ for some constants $a$ and $b$, and plugging in to the functional equation we get $f(0)=0$, so we conclude $f(x) = ax$.  
case 2.  remains to be done.  We still get Riemann sums (2), though.  In case $\int_{-1/2}^{1/2} f'(t)\,dt = \infty$ we will get $f'(x) = \infty$, no good.  So the interesting case will be where the improper Riemann integral $\int_{-1/2}^{1/2} f'(t) dt$ exists, but the Riemann sums do not necessarily converge to it.  Perhaps it is enough for a "principal value" to exist of the form
$$
\lim_{\delta \to 0^+} \int_{-1/2+\delta}^{1/2-\delta} f'(t)\,dt
$$  
added
If $\varphi$ is any function on $(-1/2,1/2)$, then
$$
\psi(x) 
= \lim_{k\to\infty}\frac{1}{2^k}\sum_{j=1}^{2^k}
\varphi\left(\frac{x}{2^k}+\frac{-1-2^k+2j}{2^{k+1}}\right)
\tag{2'}
$$
(if it exists) satisfies the functional equation
$$
\psi(x) = \frac{1}{2}\;\psi\left(\frac{x}{2}-\frac{1}{4}\right)
+\frac{1}{2}\;\psi\left(\frac{x}{2}+\frac{1}{4}\right)
\tag{1'}$$  
So integrate $\psi$ to get a solution of the original functional equation.
Now in most cases, $(2')$ yields either a constant (case 1) or $\infty$.  But carefully choosing $\varphi$ will give us something interesting.  
Examples ... take
$$
\varphi(x) = \frac{1}{x-1/2}+\frac{1}{x+1/2}
$$
and apply $(2')$ ... the result is $\psi(x) = -\pi\tan(\pi x)$, and integrating this, we get Malper's original example $\log(2\cos(\pi x))$.  
Trying to go to infinity faster or slower than $1/(x+1/2)$ at the endpoints didn't give me anything interesting: either a constant or $\pm \infty$.  But I did come up with a convergent case (apparently) with oscillatory discontinuity at the endpoints.  Start with
$$
\varphi(x) = -\frac{1}{x+1/2}\sin \left( {\frac {2\pi \,\ln  \left( x+1/2 \right) }{\ln  \left( 
2 \right) }} \right)  
-\frac{1}{x-1/2}\sin \left( {
\frac {2\pi \,\ln  \left( -x+1/2 \right) }{\ln  \left( 2 \right) }}
 \right)  
$$
Using this in $(2')$, we get this solution of $(1')$:

This oscillatory $\psi$ works out to
$$
\psi(x) = \text{Im}
\sum_{n=0}^\infty \left[-\left(n+\frac{1}{2}+x\right)^{-1+ia}
+\left(n+\frac{1}{2}-x\right)^{-1+ia}\right] ,
$$
where $a = 2\pi/\log 2$.  Summed,
$$
\psi(x) = \text{Im}\left(
-\zeta\left(1-\frac{2\pi i}{\log 2},\frac{1}{2}+x\right)
+\zeta\left(1-\frac{2\pi i}{\log 2},\frac{1}{2}-x\right)\right)
$$
in terms of the Hurwitz Zeta Function $\zeta(s,z) = \sum_{n=0}^\infty (n+z)^{-s}$.  Its integral   
 
satisfies the original functional equation.  
