Find $f: \mathbb R \to \mathbb R$ such that $f(x) + xf(1 - x) = 1 + x \space \forall \space x \in \mathbb R$
My solution: $$f(x) + xf(1-x) = 1+x \space \space ..(i)$$ Substituting $x$ with $1-x$ we have, $$f(1-x) + (1-x)f(x) = 2-x \space ..(ii)$$ Multiplying $(ii)$ by $x$ we have, $$xf(1-x) + x(1-x)f(x) = x(2-x) \space ..(iii)$$ Now subtracting $(iii)$ from $(i)$, $$f(x)+xf(1-x) - xf(1-x) - x(1-x)f(x) = 1+x - x(2-x)$$ $$\implies f(x) - x(1-x)f(x) = 1+x - x(2-x)$$ $$\implies f(x) - (x-x^2)f(x) = 1+x - (2x-x^2)$$ $$\implies f(x) + (-x+x^2)f(x) = 1 + x - 2x + x^2$$ $$\implies (1-x+x^2)f(x) = 1 - x + x^2$$ Dividing $(1-x+x^2)$ on both sides we have, $$\therefore f(x) = 1$$
Please check if this solution is correct or not. I hope it is correct. If there is any other solution I would like to read it. Please feel free to answer.
PS: I don't know if there is any duplicate question or not but if it is there instead of flagging it please mention it in the comments.