Let f(x)=2x, domain of f is set of all real numbers. Can you think of functions g and h which satisfy the two equations
g o f= 2gh and
h o f =h^2 - g^2 ?
Note: (g o f)(x)= g(f(x))
I tried but I can't able to find the general solution. Any hints or ideas or solution?
Thanks in advance.
First of all, we can get rid of $f(x)$ completely by rewriting the two given equations as
$$\begin{eqnarray} g(2x) & = & 2g(x)h(x)\\ h(2x) & = & h(x)^2-g(x)^2 \end{eqnarray}$$
which needs to be valid for all $x\in\mathbb{R}$.
As it turns out, it is sometimes easier to work with complex functions of real variable; so let's define function $T:\mathbb{R}\rightarrow\mathbb{C}$ as follows: $$T(x)=h(x)+ig(x)$$
Using the two equations for $g$ and $h$, we then get the following requirement for $T$ (which needs to be valid for all $x\in\mathbb{R}$): $$\begin{eqnarray} T(2x) & = & h(2x) + ig(2x) \\ & = & (h(x)^2 - g(x)^2) + 2ig(x)h(x) \\ & = & h(x)^2 + 2ig(x)h(x) + (ig(x))^2 \\ & = & (h(x) + ig(x))^2 = T(x)^2 \end{eqnarray}$$
Thus, any two functions $g$, $h$ satisfying the given two conditions can be used to produce a function $T$ satisfying this new equation and, even more importantly, any function $T$ satisfying this condition gives rise to suitable $g$ and $h$; they are just imaginary and real parts of $T$!
It is clear that $T(x)$ only depends on $T(x/2)$, which in turn depends solely on $T(x/4)$ and so on. More formally, if we partition the set of all real numbers into disjoint subsets defined as $R_b=\{x\in\mathbb{R}\ |\ (\exists k\in\mathbb{Z})(x=2^kb)\}$ where $b\in(-2,-1]\cup\{0\}\cup[1,2)$, the values of function $T$ for $x$ in a particular subset are in no way related to those for $x$ from other subsets.
It is also clear that if $T(x)=0$ for any member of a subset $R_b$, we necessarily have $T(x)=0$ for all members of this subset, so for now, we will only consider fully-non-zero solutions.
One of the subsets is slightly special: $R_0=\{0\}$. We have $T(0)=T(0)^2$ which gives us an additional solution: $T(0)=1$ which, in the language of $g$ and $h$ implies $g(0)=0$ and $h(0)=1$. Of course, both of these could have been determined from the initial two equations easily too; the actual magic happens when we look at $R_b$ for $b\not=0$.
Consider any specific set $R_b$: we have an infinite set of numbers of the form $2^kb$, where $k$ varies over positive and negative integers. For $k\geq 0$, it is easy to see we simply have $$T(2^kb)=T(b)^{2^k}$$ The situation is slightly more complicated for $k<0$; for example, with $k=(-1)$, we have $T(b/2)=T(b)^{1/2}$, but there are two different square roots providing a satisfying value of $T(b/2)$ and either of them would work. After deciding on the value of $T(b/2)$, we would face the same dilemma with $T(b/4)$ and so on.
In order to simplify matters a bit, we can represent the complex numbers in their trigonometric form: every non-zero complex number $z$ can be written as $z=|z|\operatorname{cis}(\phi)$, where $|z|>0$ is the absolute value of $z$, $\phi$ is its argument and $\operatorname{cis}(x)$ is just abbreviated form of $\cos(x)+i\sin(x)$. Using De Moivre's formula $$z^2=|z|^2\operatorname{cis}(2\phi)$$ we have $|T(2^kb)|=|T(b)|^{2^k}$ for all integers $k$, not just for the non-negative ones.
The two possible square roots of a number $z=|z|\operatorname{cis}(\phi)$ are also easy to express: They are just $|z|^{1/2}\operatorname{cis}(\phi/2+c\pi)$, with $c\in\{0,1\}$. In other words, all our choices of taking this or that square root when computing $T(2^kb)$ with negative indices $k$ can be expressed in a compact form as simple (infinite) sequences of zeroes and ones.
Thus, in grand summary: On each subset $R_b$ (with $b\not=0$), the function $T$ can be either equal to zero everywhere, or we have real numbers $m>0$, $\phi\in[0,2\pi)$ ($m$ and $\phi$ together represent the complex value of $T(b)$) and an infinite sequence of zeros and ones $C=\langle c_1,c_2,\ldots\rangle$) such that $$ T(2^kb)=\begin{cases} m^{2^k}\operatorname{cis}(2^k\phi)&\mbox{if }k\geq 0\\ m^{2^k}\operatorname{cis}(2^k\phi)\operatorname{cis}\left(\pi\sum_{i=1}^{(-k)} c_i2^{i+k})\right)&\mbox{if }k<0\\ \end{cases}$$
The function $T$ (and thus also $g$ and $h$, being its imaginary and real parts) is thus fully and uniquely described by:
For example, one of the solutions, as suggested in the comments to the question, is $g(x)=\sin(x)$ and $h(x)=\cos(x)$. This corresponds to $T(x)=\operatorname{cis}(x)$ and is described according to the list above as follows:
Another simple example is $T(x)=e^x$ which corresponds to $g(x)=0$ and $h(x)=e^x$.
We can also go into some more exotic functions: Let $T(x)$ be equal to zero if $x$ is irrational or zero and $b^{-2^k}$ if $x$ is expressed as $\frac{2^ka}{b}$ with $a$ and $b$ being odd, coprime integers.
It is also easy to see that if $T_1(x)$ and $T_2(x)$ are both solutions, then so is $T(x)$ defined as $T(x)=T_1(x)T_2(x)$; so we can combine the solutions rather easily to produce new ones; combining any of the "simple" ones with the outright scary stuff.