Find all $f(x)$ if $f(1-x)=f(x)+1-2x$?

HINT:

As $f(x)-x=f(1-x)-(1-x),$ put $f(x)-x=g(x)$

I'm tempted to add this :

(As IvanLoh has pointed out), if we need $f(x)$ in polynomials

As $f(x)-f(1-x)=2x-1$ which is $O(x^1), f(x)$ can be at most Quadratic

Let $f(x)=ax^2+bx+c$

$\implies 2x-1=f(x)-f(1-x)=ax^2+bx+c-\{a(1-x)^2+b(1-x)+c\}$ $\implies 2x-1=-(a+b)+2(a+b)x^2$

Equating the constants $a+b=1$

and equating the coefficients of $x,a+b=1\implies b=1-a$

So, any $f(x)=ax^2+(1-a)x+c$ will satisfy the given condition


Hint: Let $f(x)=x^2+g(x)$. What properties must $g(x)$ have?


Here is a proof which finds all $\;f\;$ for which this equality holds, as the OP (long ago) asked.$% \require{begingroup} \begingroup \newcommand{\calc}{\begin{align} \quad &} \newcommand{\op}[1]{\\ #1 \quad & \quad \unicode{x201c}} \newcommand{\hints}[1]{\mbox{#1} \\ \quad & \quad \phantom{\unicode{x201c}} } \newcommand{\hint}[1]{\mbox{#1} \unicode{x201d} \\ \quad & } \newcommand{\endcalc}{\end{align}} \newcommand{\Ref}[1]{\text{(#1)}} \newcommand{\then}{\Rightarrow} \newcommand{\when}{\Leftarrow} %$ We treat this as a problem to try and simplify the equality, and to try and reduce it to its essentials.

We calculate, for every $\;f \in \mathbb R \to \mathbb R\;$, $$\calc \tag{0} \langle \forall x :: f(1-x) = f(x)+1-2x \rangle \op{\tag{*}\equiv}\hint{arithmetic -- to introduce symmetry} \langle \forall x :: f(1-x)-(1-x) = f(x)-x \rangle \op\equiv\hint{abbreviate $\;g(x) = f(x)-x\;$} \langle \forall x :: g(1-x) = g(x) \rangle \op\equiv\hint{substitute $\;x := \tfrac 1 2 +x\;$ -- to introduce symmetry} \langle \forall x :: g(\tfrac 1 2 -x) = g(\tfrac 1 2 +x) \rangle \op\equiv\hint{abbreviate $\;h(x) = g(x+ \tfrac 1 2)\;$} \langle \forall x :: h(-x) = h(x) \rangle \op\equiv\hint{definition of even} h\text{ is even} \endcalc$$

Therefore, if $\;h\;$ is an even function, then (and only then) $\;f(x) = g(x)+x = h(x-\tfrac 1 2)+x\;$ satisfies $\Ref{0}$.

One example of such an even function is $\;h(x) = ax^2 + c\;$, which gives $\;f(x) = ax^2 + (1-a)x + c + \tfrac a 4\;$, essentially lab bhattacharjee's answer. And $\;f(x) = \cos(x- \tfrac 1 2) + x\;$ is another valid answer.

Note how the very first step $\Ref{*}$ is really the most creative one, and the others are more or less forced by the desire to find symmetry.

$% \endgroup %$