# Solving $(f(x))^2 = f(\sqrt{2}x)$

I would like to know how to solve this equation :

$$f(x)^2 = f(\sqrt{2}x)$$

We assume that $f : \mathbb R \to \mathbb R$ is $\mathcal C^{2}$.

The answer should be $f(x)=e^{-x^{2}/2}$, but I don't know how to show this.

• @AlexHalm that doesn't help ! I only get an even more complicated equation. – Dark Mar 23 '15 at 19:04
• You take log and second derivatives on both sides and the resulting function on both sides satisfy $h(x)=h(2x)$. Therefore it is constant. – Nathanson Mar 23 '15 at 19:14
• Btw you run into problems if $f(z) =0$, you may need to handle that case – Alexandre Halm Mar 23 '15 at 19:16
• @kennytm: I think you overwrote another condition, namely that $\int_{\Bbb R}f(x)\text dx=1$... – abiessu Mar 23 '15 at 19:21
• @abiessu I overwrote it. – Dark Mar 23 '15 at 19:25

Hints :

• assume $f(x) > 0$ for all $x$
• write $g = \log f$
• apply the equality in $g$ twice to get a term $g(2x)$
• take the second derivative of the equality in $g$ and get $g(2x) = g(x)$
• conclude that $g''$ is constant

• because $f(0)^2 =f(0)$, $f(0) \in \{0,1\}$
• if $\exists x \mid f(x)=0$, then $f(0)=0$ (because $f(x/\sqrt2) = \ldots = f(x/\sqrt2^n) = 0$ and $f$ is continuous in $0$
• as pointed here, if $\exists a \mid f(a)>0$, $f(a/\sqrt{2}^k) = f(a)^{\frac1{2^k}}$ and $f(0)=1$ by continuity of $f$ in $0$

So either:

• $f(0) = 1$, and then $f$ is strictly positive and $f(x) = e^{\lambda x^2}$,
• or $f(0)=0$ and $f = 0$.

PS: as Yves' excellent post shows, relaxing the $\mathcal C^{\infty}$ assumption, even only in $0$, generates a wide class of additional solutions.

PPS: I've opened a new question to see what happens if we relax some of these conditions here: $f(\alpha x) = f(x)^{\beta}$ under different constraints

• Thank you. I conclude that $g''=0$ and so $g(x) = ax+b$ : this is not the answer. What did I miss ? – Dark Mar 23 '15 at 19:37
• Thank you. So we can conclude that $f(x)=e^{\lambda x^{2}}$. – Dark Mar 23 '15 at 19:47
• $g''$ constant is a possible solution but there are many others. – Yves Daoust Mar 23 '15 at 20:57
• @YvesDaoust: not if we impose $g''$ continuous in $0$. – Alexandre Halm Mar 23 '15 at 21:42
• @AlexHalm: can you prove that ? – Yves Daoust Mar 23 '15 at 22:14

Setting $x=2^{t/2}$ and taking the logarithm twice, $$(f(x))^2=f(\sqrt2x)$$ becomes $$\log_2(\log_2(f(2^{t/2})))+1=\log_2(\log_2(f(2^{(t+1)/2})))$$ or $$h(t)+1=h(t+1).$$ An obvious solution is $h(t)=t+c$, or $\log_2(\log_2(f(2^{t/2})))=t+c=2\log_2(x)+c$, $$f(x)=2^{Cx^2}.$$

More solutions are found by adding smooth periodic functions of period $1$, like

$$h(t)=t+A\sin(2\pi t)+c,$$

that yield

$$f(x)=2^{Cx^22^{A\sin(4\pi\log_2(x))}}.$$

Example with $C=-1,A=1$: • Nice chart! You should probably highlight the derivability / positivity assumptions you're working on or the OP may become really confused – Alexandre Halm Mar 23 '15 at 21:06
• For $x<0$, I guess that the transform $x=-2^{t/2}$ works too and $f$ is an even function. I admit that derivability at $0$ should be scrutinized. – Yves Daoust Mar 23 '15 at 21:17
• My gut feel is that the periodic term introduces a $1/x$ term in the derivative. Thinking in terms of the $h$ function from the comments above, if $h(x) = p(\log(x))$, then when $x\to 0$, $\log x \to -\infty$ and $h(x)$ oscillates without a limit. – Alexandre Halm Mar 23 '15 at 21:29
• Awesome answer. Definitely filing this trick away for future use. – Cameron Williams Mar 23 '15 at 21:33
• @YvesDaoust is it possible to show that $f$ is strictly positive in the first place ? – Dark Mar 23 '15 at 21:52

With starting point $(f(x))^2=f(\sqrt 2x)$, we can get to $(f(x))^4 = f(2x)$ and further $(f(x))^{16}=f(4x)$ and so on, such that

$$(f(x))^{2^n}=f(\sqrt{2^n}x)$$

thus showing that our function passes constants in an exponential manner. Then we take $f(x)=e^{g(x)}$ and get

$$e^{2g(x)}=e^{g(\sqrt 2x)}$$

from which we can say that $2g(x)=g(\sqrt 2x)$ or $4g(x)=g(2x)$. Taking the derivative here yields

$$4g'(x)=2g'(2x)\\ 4g''(x)=4g''(2x)$$

At the point of this second derivative, we see that $g''(x)$ must be constant or periodic with period a multiple of $\sqrt 2$. Working backwards, we must have $g(x)=ax^2+bx+c$ (for non-periodic solutions), and with $2g(x)=g(\sqrt 2x)$ we must in fact have $g(x)=ax^2$ (non-periodic solutions). At this point in the process, there must be some other qualifier in order to get a single function $f(x)$ from the family

$$f(x)=e^{ax^2}$$

Caveat: $f(x)=0$ is also a possible solution not covered by the coefficient $a$ above.

Suppose that we consider $\exists x_0:f(x)\lt 0$. Then we must have $(f(x_0/\sqrt 2))^2=f(x_0)\lt 0$, which means that $f(x_0/\sqrt 2)=0+qi$ for some real $q$ and $i=\sqrt{-1}$. But now we also get that $(f(x_0))^2=f(\sqrt 2x_0)\gt 0$ which leads us into our previous solution set where none of the values are negative, which is a contradiction; therefore our assumption that there exists $x_0$ such that $f(x_0)$ is negative must be false or else our derivation of the solution set incorrectly constrains the resulting set. This would also mean that any solution containing non-real numbers cannot contain any real numbers. Since one of the tags in this particular question says "real analysis" I will take that as a cue to say, having any negative result of $f(x)$ brings the function into complex analysis, and therefore such possibilities for $f(x)$ are beyond the scope of this question.