# How to find $f$?

I was wondered to solve the following problem:

If $f(y)=f(x)\cdot f(x-y)$ only for $x \neq y$ , what is the $f(x)$ function ?

thanks

-
Should we read "only for $x \neq y$" as "it does not hold for $x = y$" or "we do not know whether it holds for $x = y$"? – TMM Sep 21 '11 at 13:17
It could also mean that $f(y)=f(x)f(x-y)$ is allowed to hold only if $x\ne y$ (but does not have to even then). In that case there are lots of solutions, such as $f(x)=2$ or $f(x)=e^{x+1}$ -- in fact every nowhere-zero function such that $f(0)\ne 1$. – Henning Makholm Sep 21 '11 at 21:52

Okay, here's one way to solve the problem.

1. First of all, note that either $f$ is the zero function, or it is nonzero everywhere. To prove this, assume that $f(c) = 0$ for some $c$. Then for $x \neq c$, we have $f(x) = f(c) \cdot f(c-x) = 0 \cdot f(c-x) = 0$. Since $f(c) =0$ already by assumption, it follows that $f$ is the zero function.

2. From now on, assume that $f$ is not the zero function. Then claim (1.) implies that $f(x) \neq 0$ for all $x$.

3. For every nonzero $x$, setting $y=x/2$ gives $f(x/2)=f(x)f(x/2)$. Since $f(x/2) \neq 0$, we can cancel it to get $f(x)=1$.

4. Finally, $f(0) = f(1) \cdot f(1 - 0) = f(1)^2 = 1$.

From (3.) and (4.), we can conclude that if $f$ is nonzero, then we must have $f(x) = 1$ for all $x$. So the only solutions are the constant functions $f(x) \equiv 0$ and $f(x) \equiv 1$.

Depending on what the OP means by "only for $x\ne y$", these two solutions are either the only solutions, or there are no solutions at all.

(We have tacitly assumed that the domain and codomain of $f$ are fields of characteristic $\ne 2$.)

-
Here's another (more direct?) way to prove that either $f$ is the zero function or it is nonzero everywhere. Suppose $f(c) = 0$ for some $c$. Then for $x \neq c$, $f(x) = f(c) \cdot f(c - x) = 0$. We already have $f(c)=0$. So $f$ is the zero function. – Srivatsan Sep 21 '11 at 14:18
@Sriv, that's much better. Then we don't need to talk about square roots in order to cancel $f(x/2)$. Will you edit? – Henning Makholm Sep 21 '11 at 14:20
@Hen Well, is it ok if I edit it substantially? – Srivatsan Sep 21 '11 at 14:22
@Srivatsan, that's what CW is supposed to be for, isn't it? – Henning Makholm Sep 21 '11 at 14:25
@Hen Done. I hope this is a clean and complete proof. :) – Srivatsan Sep 21 '11 at 14:34

Taking $y=0$ we get $f(0)=f(x)^2$ for all $x\ne0$.

If $f(0)=0$ then $f\equiv0$.

If $f(0)\ne0$ then $f$ is never zero. In this case take $x=2y$ and get $f(y)=f(2y)f(y)$, which implies $f(2y)=1$ for all $y\ne0$. Thus $f\equiv1$.

(Thanks to Henning Makholm and Srivatsan Narayanan for helping cleaning this up.)

-
Not only is it constant, the constant is also either $0$ or $1$. – TMM Sep 21 '11 at 13:10
@Henning: But then it also cannot be $1$... – TMM Sep 21 '11 at 13:14
both answers contradict with the assumption of problem. – saeed sani Sep 21 '11 at 13:21
according to assumption of problem, if $x=y$ then $f(y)\neq f(x).f(x-y)$ – saeed sani Sep 21 '11 at 13:54
@saeed: If $f(y)=f(x)\cdot f(x−y)$ for $x \neq y$ and $f(y)\neq f(x)\cdot f(x−y)$ for $x = y$, then as pointed out several times there are no solutions. – TMM Sep 21 '11 at 18:03

I found it.
According to assumption of problem if $y=x$ thus $f(y)\neq f(x).f(x−y)$ or $f(x)\neq f(x).f(0)$, so if $x=0$ thus $f(0)\neq f(0).f(0)=f^2(0)$ since $f(0)\neq 0,1$ $((1))$
If $y=0$ thus $f(0)=f(x)f(x-0)=f^2(x)$ so $f(0)>0$ and if $x \neq0$ thus $f(x)=\pm \sqrt{f(0)}$ $((2))$ According to assumption and $((2))$ $\Longrightarrow$ $|f(y)|=|f(x).f(x-y)|$ then $\sqrt{f(0)}=\sqrt{f(0)}.\sqrt{f(0)}=f(0)$ thus $f(0)=0 or 1$ and This is a paradox by using $((1))$, Thus $\forall x,y\in\ D_{f}$ -{0} $\Longrightarrow$ $x-y \notin D_{f}$ $\Longrightarrow$ $f(x) =$ \begin{cases} \ f(0)=c, & \ x=0, \ \pm \sqrt {c}, & \ x \ne 0, \end{cases} And $\forall x,y\in\ D_{f}$ -{0} : $x-y \notin D_{f}$

Such as $f(x) =$ \begin{cases} \ 4, & \ x=0, \ -2, & \ x \in (1,2], \end{cases}

-
everybody can not understand above answer , he can vote negative. – saeed sani Sep 22 '11 at 20:36