# Is $f(x) = \sum_{n=-\infty}^\infty \frac{2^n \log x}{1+(2^n \log x)^2}$ for $x \geq 2$ constant?

I want to find a non-constant, continuous function $f: [2, \infty) \rightarrow \mathbb{R}$ which satisfies $f(x) = f(x^2)$ for all $x \in [2, \infty)$. A friend of mine suggested to try something of the form $$f(x) = \sum_{n=-\infty}^\infty \varphi(2^n \log x)$$ and we tried $\varphi(x) = \frac{x}{1+x^2}$. Now my friend plotted the function for $-1000 \leq n \leq 1000$ which gave the following result:

Now we let MATLAB compute $f(x)$ for a few $x \in \mathbb{N}$ and observed that $f(x) \approx 2.2662$. As the plot of the function did not imply that the function was constant but periodic (however with a very small amplitude), we computed a few other values, e.g. $x = \pi$, $x = \pi+1$ and we were surprised to see that again $f(x) \approx 2.2662$. For large values, MATLAB was no more capable of computing the result.

So I mainly have have two questions:

1. Is this function constant? How can I see this and prove or disprove it?
2. Is there a more trivial example of such a function which is non-constant?

-
Since the function oscillates between 2.26618 and 2.26619, you should just have calculated more digits. Note that most of the oscillations occur for small values, so large values are not very useful, anyway. – Phira Nov 15 '11 at 21:16

You just have to take the log two times instead of one:

Replace $f(x)=f(x^2)$ by $g(x)=f(\exp(x))$ and $g(x)=f(\exp(x))=f(\exp(2x))=g(2x)$.

Replace $g(x)=g(2x)$ by $h(x)=g(\exp(x))$ and $h(x)=g(\exp(x))=g(\exp(x+\log(2)))=h(x+\log(2))$.

Now, find a non-constant continuous function with period $\log 2$.

$$h(x)=\sin\left(\frac{2\pi x}{ \log 2}\right)$$

So, we can take $$f(x)=g(\log(x))=h(\log(\log(x)))= \sin\left(\frac{2\pi \log \log x}{\log 2}\right)$$

This is defined if $\log x$ is positive, so for $x > 1$.

Now, for your function, regard the corresponding integral (you have $a=2$ and $y=\log x$) and make the variable change $u=ya^t$:

\begin{align} \int_{-\infty}^{\infty}\varphi(y a^t)dt&=\int_{-\infty}^{\infty}\frac{y a^t}{1+y^2a^{2t}}dt\\ &=\int_{0}^{\infty}\frac{1}{\log a}\frac{1}{1+u^2}du\\ &=\frac{1}{\log a}\arctan u \,\,\big|_{u=0}^{u=\infty}\\ &=\frac{\pi}{2\log a} \end{align}

In particular, the integral does not depend on $y$ and is constant and for $a=2$, the value $\frac{\pi}{2\log 2}$ is the mysterious $2.266$.

This explains why your sum is close to this value, but this does not make your sum constant.

How to estimate the number of necessary terms for 6 digits:

We find upper limits for the two tails:

$$\sum_{n < -M}\frac{2^n\log x}{1+(2^n\log x)^2}< \sum_{n < -M}\frac{2^n\log x}{1}= \frac{\log x}{2^M}$$

and

$$\sum_{n > M}\frac{2^n\log x}{1+(2^nlog x)^2}=\sum_{n > M}\frac{2^{-n}\log x}{2^{-2n}+(\log x)^2}< \sum_{n > M}\frac{2^{-n}\log x}{(\log x)^2} = \frac1{\log x 2^M}$$

So, it is sufficient to sum from $-M$ to $M$ if $\frac{\log x}{2^M}+\frac1{\log x 2^M} < 10^{-7}$ which is equivalent to $10^7(\log x+\frac 1{\log x }) < 2^M$ or

$$M > \log_2(10^7(\log x +\frac1 {\log x})).$$

For example, for $x=\pi$, you can take $M=25$, but don't forget that you need to calculate each term with appropriate precision (9 digits after the comma will suffice to sum 50 terms to a 7 digit result).

-
I think you made a typo in the first part: $h(x) = g(\exp x) = g(\exp(x + \log 2))$, not $h(x) = f(\exp(x+\log2))$. I have a question about the second part: I understand the integral is constant and does not depend on $y$. But how can I conclude from this whether or not my sum is constant? – Huy Nov 16 '11 at 14:19
@Huy I fixed the mistake. You cannot conlude from the integral that your sum is or isn't constant, but you can conclude that there is a good reason for the sum to be close to this value and no reason that it should be exactly this value since this kind of scaling does not respect the discreteness of the sum. Since the sum is close to a geometric series, one can estimate how many terms are needed for 6 digits. Then the results from the calculation are the proof that your sum is not constant. My comment to your question said the same thing. – Phira Nov 16 '11 at 15:41
Phira: I suggest you include the following in your post. The function $f$ is not constant because $f(\mathrm e)\ne a$ with $a=\pi/(2\log2)$. To wit, $f(\mathrm e)=\lim S_n$ with $S_n=(1/2)+2\sum\limits_{k=1}^n2^k/(1+4^k)$. But W|A says that $S_{19}\approx a+2\cdot10^{-6}>a$, and $f(\mathrm e)\gt S_n$ for every $n\geqslant0$, hence $f(\mathrm e)>a$. – Did Nov 16 '11 at 16:40
@DidierPiau: I don't understand your comment. I assume by $\mathrm e$ you mean 1 and obviously $f(1) = 0$. I don't see the relation between my function and your $S_n$ and thus I don't understand your argumentation. And to Phira: "the sum is close to a geometric series" - how can I then estimate how many terms are needed for 6 digits? I am sorry if this is obvious but my knowledge in approximations is very limited. – Huy Nov 21 '11 at 16:25