22

Find all functions $g:\mathbb{R}\to\mathbb{R}$ with $g(x+y)+g(x)g(y)=g(xy)+g(x)+g(y)$ for all $x,y$.

I think the solutions are $0, 2, x$. If $g(x)$ is not identically $2$, then $g(0)=0$. I'm trying to show if $g$ is not constant, then $g(1)=1$. I have $g(x+1)=(2-g(1))g(x)+g(1)$. So if $g(1)=1$, we can show inductively that $g(n)=n$ for integer $n$. Maybe then extend to rationals and reals.

user70520
  • 2,315
  • 1
  • 19
  • 28
  • It is much more complicated than it seems. If you put $x=y=0$, you get either $g(0)=0$ or $g(0)=2$. If $g(0)\neq 0$ then put $y=0$ in the equation and you get for all other $x$, $g(x)=2$. But be careful that you can still choose $g(0)=0$ and $g(x)=2$, so we have:

    First solution: $g(x)=2$

    Second solution: $g(x)=2$ for $x\neq 0$ and $g(0)=0$

    Now if $g(0)=0$ there are other possibilities. Choose $x=y=2$ and then either $g(2)=0$ or $g(2)=2$.

    If $g(2)=0$, then either $g(1)=0$ or $g(1)=3$. For $g(1)=0$, you get $g(n)=0$ for all $n\in\mathbb{Z}$ and continue like this...

    – Arash Sep 02 '13 at 00:11
  • This is from Belarus 1997. – Calvin Lin Sep 02 '13 at 00:11
  • If you explore each one there may be various functions which may not be continuous. So no differential equation may be solved here. I may finish the proof later on and put it here. – Arash Sep 02 '13 at 00:12
  • This is the second problem at http://www.imomath.com/index.php?options=341&lmm=0 But the solution there is sketchy... – user70520 Sep 02 '13 at 00:18
  • @user70520, my antivirus program complain your link has a trojan horse. – achille hui Sep 02 '13 at 00:23
  • @ArashBeh Note that your second solution doesn't work, with $y=-x \neq 0$ we get that $4 = g(0) + g(x)g(-x) = g(-x^2) + g(x) + g(-x) = 6$. – Calvin Lin Sep 02 '13 at 00:25
  • @CalvinLin, Thanks! You are right about it. – Arash Sep 02 '13 at 00:46

6 Answers6

12

Let $P(x,y)$ denote $g(x+y) + g(x) g(y) =g(xy) + g(x) + g(y) $. The important statements that we'd consider are

$$ \begin{array} { l l l } P(x,y) & : g(x+y) + g(x) g(y) =g(xy) + g(x) + g(y) & (1) \\ P(x,1) & : g(x+1) + g(x) g(1) = 2 g(x) + g(y) & (2) \\ P(x, y+1) & : g(x+y+1) + g(x) g(y+1) = g(xy+x) + g(x) +g(y+1) & (3)\\ \end{array} $$

Let $g(1) = A$. With $x=y=1$, we get $g(2) + A^2 = 3A$.

With $x=y=2$, we get $g(4) + g(2)^2 = g(4) + 2g(2) $. Hence either $g(2) = 0$ or $g(2) = 2$.

Case 1: If $g(2) = 0$, then $A^2 - 3A = 0$ so $A=0$ or $A=3$.

Case 1a: (This case is incomplete) If $A=0$:
$(2)$ gives us $g(x+1) = 2g(x)$.

$(3)$ gives us $g(x+y+1) +g(x)g(y+1)= g(xy+y) + g(x)+g(y+1)$.
Applying the above gives $2g(x+y)+g(x)2g(y) = g(xy+x) + g(x) + 2g(y)$, or that $2g(x+y) + 2g(x)g(y) = g(xy+x) + g(x) + 2g(y)$.

$(1)$, combined with the above gives us $g(xy+x) = 2g(xy) + g(x) $.
Substitute $y=1$ in the above identity, we get $g(2x) = 3g(x)$.

(Incomplete here)

Comparing with the first equation, we thus have $g(x) = 0 $.
It is easy to check that $g(x) = 0$ is a solution.

Case 1b: If $A=3$:
$(2)$ gives us $g(x+1) = - g(x) + 3$.

$P(x,2)$ gives us $g(x+2) = g(2x) + g(x)$.

From the previous identity, $g(x+2) = -g(x+1) + 3 = g(x)$. Hence $g(2x) = 0$ for all $x$. However, with $x = \frac{1}{2}$, we have a contradiction. There is no solution in this case.

Case 2: If $g(2) = 2$, then $A^2 - 3A +2 = 0 $ so $A= 1$ or $A=2$.

Case 2a: If $A = 1$:
$P(0,1) $ gives us $g(1) + g(0) = g(0) + g(0) + g(1)$ so $g(0) = 0 $.

$(2)$ gives us $g(x+1) = g(x) + g(1)$.

$(3)$ gives us $g(x+y+1) + g(x) g(y+1) = g(xy+x) + g(x) + g(y+1)$. Using the above, this gives us $ g(x+y) + g(x) g(y) = g(xy+x) + g(x) + g(y) $.

$(1)$ gives us $g(x+y) + g(x) g(y) = g(xy) + g(x) + g(y)$. Hence $g(xy+x) = g(xy) + g(x) $.

Now, for non-zero $a, b$, let $x = b$ and $ y = \frac{b}{a}$. This gives us $g(a+b) = g(a) + g(b) $. It is clear that this equation also holds if $a$ or $b$ equals 0, since $g(0) = 0 $. Thus, we have $g(x+y) = g(x) + g(y) $.

This also yields $g(xy) = g(x) g(y)$. With these 2 equations, the only solution is $g(x) = x$. (slight work here, but this is standard in functional equations).

Case 2b: If $A=2$:

$(2)$ gives us $g(x+1) +2g(x) = g(x) + g(x) + g(1)$, so $g(x) = 2$ for all $x$. This is clearly a solution.

In conclusion, we only have the 3 solutions $g(x) = 0$ or $g(x) = 2$ or $g(x) = x$.

Calvin Lin
  • 68,864
  • (+1) Impressive answer. However, the formatting of this answer is a little bit hard to read and it takes me quite a while to follow all the steps. – achille hui Sep 02 '13 at 01:40
  • @achillehui I agree about the formatting. I'm trying to figure out if there is a better way to present the answer. (e.g. I decided against looking at $f(0)$, which would be a common first step). Any suggestions? – Calvin Lin Sep 02 '13 at 01:43
  • I think the overall logic flow is solid. It is all those inline equations make one hard to separate one logic statements from another. I think split them out in individual lines will help a lot. The only logic statement that need a little bit more elaboration is how does one get from $f(xy+x) = f(xy) + f(x)$ to $f(x+y) = f(x) + f(y)$. – achille hui Sep 02 '13 at 01:52
  • "With $y=y+1$, we get $f(x+y+1) + f(x)f(y+1) = f(xy+y) + f(x) + f(y+1)$" Plugging in $y + 1$ for $y$ gives the term $f(xy + x)$, not $f(xy + y)$ as stated. Is this an error, or do I misunderstand the idea? – Caleb Stanford Sep 02 '13 at 02:11
  • @Goos It was a typo. I've gone through and ensured that it's properly written up (and changed $f$ to $g$). There should be no $xy+y$ term around. – Calvin Lin Sep 02 '13 at 02:26
  • Although the simplification introduces a lot of typos, it is now much easier to follow the logic... – achille hui Sep 02 '13 at 02:45
  • @Calvin Lin in case 1a) after substituting y=1 we will get $3f(x)=f(2x)$...how you got $g(x+1) = 2g(x) + g(x)$ ??? – Ishan Apr 17 '20 at 05:42
  • @User88463 Yes, that's right. Unfortunately, I don't recall what I did back then. You can look up Belarus 1997 to try to find a solution set. – Calvin Lin Apr 17 '20 at 05:52
2

This is my answer to the question solving functional equation $f(x+y)+f(x)f(y)=f(x)+f(y)+f(xy)$ for all real numbers, which I recently found to be a duplicate. I thought it might be useful to post it here.

The only solutions to the functional equation $$g(x+y)+g(x)g(y)=g(x)+g(y)+g(xy)\tag0\label0$$ are the identity function $g(x)=x$, and constant functions $g(x)=0$ and $g(x)=2$.

To observe this, if we set $x=y=2$ we get $g(2)=0$ or $g(2)=2$. By setting $x=y=1$ we get $\big(g(1)\big)^2-3g(1)+g(2)=0$. So if $g(2)=0$ then $g(1)=0$ or $g(1)=3$, and if $g(2)=2$ then $g(1)=1$ or $g(1)=2$.

  1. If $g(2)=0$ and $g(1)=3$, by letting $y=1$ in \eqref{0}, we have $g(x+1)=3-g(x)$ which yields $g(x+2)=3-g(x+1)=3-\big(3-g(x)\big)=g(x)$. Now if we put $x=\frac{1}{2}$ and $y=2$ in \eqref{0} we get $g(1)=0$ which leads to a contradiction. So this case can't happen.
  2. If $g(2)=0$ and $g(1)=0$, by letting $y=1$ in \eqref{0}, we have $g(x+1)=2g(x)$ which inductively yields $g(x+n)=2^ng(x)$ for any nonnegative integer $n$. Now if we put $y=2$ in \eqref{0} we get $g(2x)=3g(x)$ and then $g(4x)=3g(2x)=9g(x)$. Againg, putting $y=4$ in \eqref{0} we conclude that $g(4x)=15g(x)$ since $g(4)=2^2g(2)=0$. Hence $9g(x)=15g(x)$ and so $g$ is the constant zero function.
  3. If $g(2)=2$ and $g(1)=2$, by letting $y=1$ in \eqref{0}, we have $g(x+1)=2$. So $g$ is the constant two function.
  4. If $g(2)=2$ and $g(1)=1$, by letting $y=1$ in \eqref{0}, we have $g(x+1)=g(x)+1$ which inductively yields $g(x+n)=g(x)+n$ for any integer $n$. By putting $y=n$ in \eqref{0} we have $g(nx)=ng(x)$ since $g(n)=g\big(1+(n-1)\big)=n$. Substituting $2x$ for $x$ and $2y$ for $y$ in \eqref{0} we get: $$g(2x+2y)+g(2x)g(2y)=g(2x)+g(2y)+g(4xy)$$ $$\therefore 2g(x+y)+4g(x)g(y)=2g(x)+2g(y)+4g(xy)$$ Multiplying \eqref{0} by $2$ and subtracting the last equation, we get: $$g(xy)=g(x)g(y)\tag1\label1$$ Subtracting \eqref{0} and \eqref{1} we have: $$g(x+y)=g(x)+g(y)\tag2\label2$$ It's well known that if $g$ satisfies \eqref{1} and \eqref{2}, then it's either the constant zero function or the identity function (hint: \eqref{1} implies that $g(x)$ is nonnegative for nonnegative $x$. By \eqref{2} we conclude that $g$ is increasing.)
1

About showing that $g(1)=1$: If we assume that $g(0)=0$ and $g(2)\neq 0$, we can prove that $g(1)=1$ as follows:

We take $x=y=2$, and substitute:

$g(2+2)+g(2)g(2)=g(2\cdot 2)+g(2)+g(2)$

thus

$g(4)+g(2)^2=g(4)+2g(2)$, and since we are assuming that $g(2)\neq 0$, then

$g(2)=2$.

Now, if we have $x\neq 0$, then taking $y=x^{-1}$ and substituting on the original equation gives us

$g(x+x^{-1})+g(x)g(x^{-1})=g(1)+g(x)+g(x^{-1})$.

In particular, taking $x=1$,

$g(2)+g(1)g(1)=g(1)+g(1)+g(1)$.

The assumption $g(2)\neq 0$ and this equation in particular imply that $g(1)\neq 0$. And in fact we have

$3g(1)-g(1)^2=g(2)=2$, which gives $g(1)=1$ or $2$.


Added later (to rule out $g(1)=2$):

Suppose that $g(1)=2$. Taking $x=1,y=-1$ we have

$g(1+(-1))+g(1)g(-1)=g(1\cdot (-1))+g(1)+g(-1)$, that is

$2g(-1)=g(-1)+2+g(-1)$, and so

$0=2$, which is absurd.

1

It is much more complicated than it seems. If you put $x=y=0$, you get either $g(0)=0$ or $g(0)=2$. If $g(0)\neq 0$ then put $y=0$ in the equation and you get for all other $x$, $g(x)=2$.

First solution: $g(x)=2$

Now if $g(0)=0$ there are other possibilities. Choose $x=y=2$ and then either $g(2)=0$ or $g(2)=2$.

If $g(2)=0$, then either $g(1)=0$ or $g(1)=3$. For $g(1)=0$, you get $g(n)=0$ for all $n\in\mathbb{Z}$. Also you get: $$ g(x+n)=g(nx)+g(x)\rightarrow g(x+1)=2g(x) \rightarrow g(x+n)=2^ng(x) $$ On the other hand you have: $$ g(mx)=(2^m-1)g(x) $$ Now write: $g(2x+2n)$ in two ways. $$ g(2x+2n)=2^{2n}g(2x)=2^{2n}3g(x)\text{ or } g(2x+2n)=3g(x+n)=2^{n}3g(x). $$ Now for all $n$ we have $2^{n}3g(x)=2^{2n}3g(x)$ which means $g(x)=0$. So you get:

Second solution: $g(x)=0$ for $g(0)=g(2)=g(1)=0$.

Now if $g(1)=3$, we can see that $g(x+1)+g(x)=3$ which gives $g(2k)=0$ and $g(2k+1)=3$. Also $g(x)=g(x+2)=g(x+2n)$ Moreover we have similar to before: $$ g(x+2n)=g(2nx)+g(x)\rightarrow g(x+2)=g(2x)+g(x) \rightarrow g(2x)=0. $$ so for all $x$, $g(2x)=0$ which is in contradiction with $g(1)=3$ (choose $x=0.5$). So $g(1)$ cannot be 3.

Now we go the case where $g(0)=0$ and $g(2)=2$. By similar argument, $g(1)$ is either 1 or 2. $x=2$ leads to contradiction in a similar way and so you should consider $g(1)=1$ which by induction gives $g(n)=n$. To prove it for rationals start with observing that $g(n+x)=n+g(x)$. Then choose $x=n$ and $y=\frac{1}{n}$ which gives you $g(\frac{1}{n})=\frac{1}{n}$. Finally it can be shown that $g(\frac{m}{n})=\frac{m}{n}$ and then you can show that $g(x)\neq x$ leads to contradiction:

Third Solution: $g(x)=x$.

Arash
  • 11,131
  • "by assuming continuity at irrational points..." You should put a disclaimer at the top of your question if you intend to answer only a specific case of functions. – Caleb Stanford Sep 02 '13 at 01:55
  • I have to correct myself here. There is no need for continuous assumption. One can assume $g(x)>x$ and gets the contradiction. – Arash Sep 02 '13 at 11:59
  • Similarly for $g(x)<x$ – Arash Sep 02 '13 at 12:17
1

Here's a much less murky solution with strong influence from Calvin Lin's excellent answer. $$ g(x + y) + g(x)g(y) = g(xy) + g(x) + g(y) \tag{0} $$ First of all, plugging in $y = 1$ gives $$ g(x + 1) + g(x)g(1) = 2g(x) + g(1)$$

For readability let $g(1) = k$ and we have $$ g(x + 1) = (2-k)g(x) + k \tag{1} $$

Plugging in $y + 1$ for $y$ in (0) and reducing with (1): \begin{align*} g(x + y + 1) + g(x)g(y+1) &= g(xy + x) + g(x) + g(y+1) \\ (2-k)g(x + y) + k + g(x) \left[ (2-k)g(y) + k \right] &= g(xy + x) + g(x) + (2-k)g(y) + k \\ (2-k)\left[g(x + y) + g(x) g(y) - g(x) - g(y)\right] + g(x) &= g(xy + x) \end{align*}

Using (0) again we conclude $$ g(xy + x) = (2-k)g(xy) + g(x) $$

So as long as $x$ is nonzero, letting $z = xy$ we have $$ g(z + x) = (2 - g(1))g(z) + g(x) \tag{2} $$ for all real $x$ and $z$, $x \ne 0$.

From here on out we just work with the much cleaner equation (2). Setting $z = 0$ gives $(2 - g(1))g(0) = 0$, so either $g(1) = 2$ or $g(0) = 0$. If $g(1) = 2$, then $g(z + x) = g(x)$ so $g(x) = 2$ everywhere. Otherwise, $g(0) = 0$, so plug in $z = -x$ to (2): $$ 0 = (2 - g(1))g(-x) + g(x) \implies g(x) = (g(1) - 2) g(-x) $$

It follows by applying this to $g(--x)$ that $g(x) = (g(1) - 2)^2 g(x)$. If $g(x)$ is 0 everywhere, this is a solution to the original (0); otherwise, this implies $g(1) - 2 = \pm 1$, so $g(1) = 1$ or $g(1) = 3$.

In the case $g(1) = 1$, $g(z + x) = g(z) + g(x)$. This implies $g(x) = mx$ for some constant $m$, and $g(1) = 1$ so $g(x) = x$.

In the case $g(1) = 3$, $g(z + x) = -g(z) + g(x)$. But exchanging $x$ and $z$, $g(z + x) = -g(x) + g(z)$, so $g$ is uniformly 0 (which we already assumed was not the case).

  • 1
    To apply Cauchy's equation solution for reals in the paragraph second to last, you must satisfy one of the conditions that this holds (like continuous, bounded, monotone). You have to verify that. – croraf Dec 20 '20 at 13:22
  • @croraf Thanks for the correction. Feel free to edit. – Caleb Stanford Dec 20 '20 at 18:48
0

Substituting an infinitesimal $y=dx$ gives

$g(x)+g(x)g(0)=g(0)+g(x)+g(0)$ or $g(x)g(0)=2 g(0)$

and

$g'(x)+g(x)g'(0)=g'(0)x+g'(0)$,

for a smooth function $g(x)$. The first equation implies either $g(0)=0$ or $g(x)=2$. Solving the differential equation with the condition $g(0)=0$ gives

$g(x)=\frac{1}{k}((1-k)e^{-kx}+k(x+1)-1),$

where $k=g'(0)\ne0$. If $g'(0)=0$, then $g(x)=0$. Any smooth solution of your equality with $g(0)=0$ and $g'(0)\ne0$ must be of this form for some $k=g'(0)$. I get $g(x)=x$ for $k=1$. You can check if that is the only option by substituting $g(x)$ into your equality.

Andrey Sokolov
  • 1,536
  • 10
  • 15
  • 1
    Substituting infinitesimals and arguing for the restrictions for differentiable $g$ severely limits the possibilities of all the crazy exotic functions out there. – user2566092 Sep 02 '13 at 00:05
  • I'm not claiming there are no non-smooth solutions. All I'm saying is that if $g(x)$ is smooth, then this is how you can deal with the problem. – Andrey Sokolov Sep 02 '13 at 00:07
  • @user2566092 But under mentioned assumptions, the answer seems to be correct. I don't understand the downvote. (+1) – Start wearing purple Sep 02 '13 at 00:09
  • By looking at $g(4)$, I find $g(1)$ can only be $0, 1, 2$ and $3$. Any solution with $g(1) = 3$ must have $g(2n) = 0, g(2n+1) = 3$ for $n > 0$. This doesn't falls into the form of solution you have. This seems to indicate there is no non-trivial smooth solution for this problem. – achille hui Sep 02 '13 at 00:15
  • @O.L. I didn't downvote, I don't feel like this is the kind of answer that deserves to be down-voted. But I did point out the glaring flaw, namely there are plenty of non-differentiable functions that satisfy interesting properties. – user2566092 Sep 02 '13 at 00:25