# When is it possible to have $f(x+y)=f(x)+f(y)+g(xy)$?

According to the question mentioned here, it seems that there is no function $f(x)$ such that the functional equation

$$f(x+y)=f(x)+f(y)-(xy-1)^2$$

can hold. Motivated by this question, I found it interesting to somehow extend the question.

What conditions are required for a given function $g(x)$ such that there exists a function $f(x)$ that can satisfy the following equality $$f(x+y)=f(x)+f(y)+g(xy)$$ where $f(x)$ and $g(x)$ are real valued functions of real variable.

Any hint or help is appreciated. :)

• Trivial observation: for each fixed $a \in \mathbb{R}$, the functions $f(x)=ax^2$ and $g(x) = 2ax$ satisfy the required constraint. I guess the question, then, is really: do other examples exist, and if so, are they continuous? – goblin Jan 28 '16 at 18:17
• In fact, $ax^2+b$ and $2ax-b$ seems to work. – goblin Jan 28 '16 at 18:18

## 2 Answers

If $f$ is not differentiable, we still have $f((x+y)+z)=f(x+(y+z))$, from which follows

$$g(xy)+g(xz+yz)=g(xy+xz)+g(yz)\tag{1}$$

By change of variables

$$x=\sqrt{\frac{ab}{c}}, \quad y=\sqrt{\frac{ca}{b}}, \quad z=\sqrt{\frac{bc}{a}}\tag{2}$$

this becomes

$$g(a)+g(b+c)=g(a+b)+g(c)\tag{3}$$

whenever $abc>0$.

By change of variables $(a,b,c)\to(a+b,-b,b+c)$ we can also move $-b$ across so it holds for all $abc\neq0$. Then

$$g(a+b)+g(b-b)=g(a)+g(b)\tag{4}$$

so $h(x)=g(x)-g(0)$ satisfies $$h(a+b)=h(a)+h(b)\tag{5}$$ This has the well-known solutions $h(x)=kx$, and some very discontinuous ones.

• The relation between $(x,y,z)$ and $(a,b,c)$ is not obvious. Maybe it could be useful if you added some explanation. – Mohsen Shahriari Jan 28 '16 at 20:23
• Thanks for the nice answer. I added some more details to your solution. But I still have some questions about it. Firstly, where the condition $abc \gt 0$ comes from? I think each of $a,b,c$ should be positive $a,b,c>0$. :) – H. R. Jan 28 '16 at 21:08
• One more thing, according to your solution, if $g(x)$ is continuous then it must be a linear function of $x$ right? – H. R. Jan 28 '16 at 21:14
• Yes, $g(x)$ is linear for rational values of $x$, so the irrational values follow by interpolation. – Empy2 Jan 29 '16 at 3:45

If $f$ is differentiable then taking the derivative with respect to $x$ we get

$$f'(x+y)=f'(x)+yg'(xy).$$ Now, taking the derivative with respect to $y$ one has $$f''(x+y)=g'(xy)+xyg''(xy).$$ If $y=-x$ then $$g'(-x^2)-x^2g''(-x^2)=f''(0).$$ If we denote $t=-x^2$ we have $$tg''(t)+g'(t)-f''(0)=0.$$ Solving the ODE we get $$g(t)=f''(0)t+a\ln t+b,$$ where $a,b$ are arbitrary constants. If we want that $g$ is defined for all $t$ it must be $a=0.$ So $$g(t)=f''(0)t+b.$$ Now, from $$f''(x+y)=g'(xy)+xyg''(xy)$$ we get that $$f''(x+y)=f''(0).$$ So the second derivative of $f$ must be constant. That is, $f$ is a second degree polynomial. It only remain which polynomials of degree two can be a solution. It is a straightforward computation to check that any $f(x)=ax^2+bx+c$ is a solution with $g(x)=2ax-c.$

• It only remain which polynomials of degree two can be a solution. So? Which ones? – Najib Idrissi Jan 28 '16 at 18:33
• @NajibIdrissi I have edited the answer. – mfl Jan 28 '16 at 18:35
• @mfl I know this is a silly question but how do you differentiate $g (xy)$ wrt $x$ I used $u=xy$ and the chain rule but that gives me $\frac {dg}{du}y$ not $g'(xy)y$ I'd like to follow the rest of your answer. Thanks. – Karl Jan 28 '16 at 19:42
• @Karl The derivative of $g(xy)$ with respect to $x$ is $\frac{dg}{du}\cdot \frac{du}{dx}.$ Now, $\frac{dg}{du}=g'$ and $\frac{du}{dx}=y.$ – mfl Jan 28 '16 at 19:45
• @mfl I am reading $g'$ as $\frac {dg}{dx}$ why is it allowed to be $\frac {dg}{du}$ if $f'=\frac{df}{dx}$ thanks for your help. – Karl Jan 28 '16 at 19:53