# 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.

#### Solutions Collecting From Web of "Solving $(f(x))^2 = f(\sqrt{2}x)$"

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

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$:

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.