Can you please help me solve this problem?
Find all real functions that satisfy the functional equation $f(xy+x)+f(y)=f(xy+y)+f(x)$.
I should solve it using the following theorem:
Let $f:\mathbb R\to\mathbb R$ satisfy the Hosszu functional equation $$f(x+y-xy)+f(xy)=f(x)+f(y)$$ for all $x,y \in \mathbb R$. Then there exists an additive function $A:\mathbb R \to\mathbb R$ and a constant $a\in\mathbb R$ such that $$f(x)=A(x)+a\text.$$
Any advice would be helpful. I tried putting $x=y=1$ but didn't know what to do next.
Note that this functional equation requires continuity to have well-defined solutions. Otherwise, any function that satisfies Cauchy's functional equation also satisfies this, and there may be other pathological functions (I haven't found any yet though).
Now, if we assume $f$ is continuous, we have:
Firstly, we note that if $f(x)$ satisfies the equation, so does $f(x)+C$ for any real constant $C$. Thus, assume $f(0)=0$.
Let $P(x,y)$ denote the assertion $f(xy+x)+f(y)=f(xy+y)+f(x)$.
Lemma 1: $f(x) = x f(1)$ $\forall x \geq 0$
Proof:
Let $x > y > 0$. Consider the sequence $y_0 = y$, $y_{n+1} = \frac{x^2+xy_n+y_n}{x+y_n+1}$. We note that $y_n$ is an increasing sequence with a limit of $x$.
$$P \left ( \frac{x-y_n}{x+y_n+1}, x+y_n \right ) \implies f(x-y_n)+f(x+y_n)=f(x-y_{n+1})+f(x+y_{n+1})$$
From this, we get $f(x-y_n)+f(x+y_n) = f(x-y)+f(x+y)$. Sending $n \to \infty$ and using continuity yields $f(x-y)+f(x+y)=f(2x) \; \forall x>y>0$. Thus, we get $f(x)+f(y)=f(x+y) \; \forall x, y >0, x\neq y$. Using continuity, we get $f(x)+f(y)=f(x+y) \; \forall x, y \geq 0$,s o $f(x)=xf(1)$. $_\square$
Lemma 2: $f(-x)=-f(x) \; \forall x$
Consider the sequence $x_0 = x$, $x_{n+1}=\dfrac{x_n}{x_n+1}$. Note that $x_n$ is a decreasing sequence tending to $0$.
$$P(x_n, -x_{n+1}) \implies f(-x_{n+1}) + f(x_{n+1}) = f(-x_n) + f(-x_n)$$. Thus, $f(-x_n) + f(x_n) = f(-x) + f(x)$. Sending $n \to \infty$ and using continuity yields $f(x)+f(-x) = f(0)+f(0)=0$. Thus, $f(-x)=-f(x)$. $_\square$.
Thus, we have $f(x)=ax$ for some constant $ \in \mathbb{R}$. Accounting in the original assumption, we have $f(x)=ax+b$, where $a,b \in \mathbb{R}$, for $f$ continuous.