Find all functions $f : [0, \infty ) \to \mathbb{R},$ that is, an expression for $f(x),$ such that for all $x,y \in [0,\infty)$ we have $f(x+2y)+2f^2(y)+x = f^2(x+2y)+2f(y)-\frac{1}{4}.$

Determine the value of $f$ for some simple cases.

What about the value of $f(0)?$

Why not try getting an equation of $f$ with a single variable?

… by substituting a suitable value for $y.$

By setting $x=y=0,$

$$\begin{aligned} f(0) + 2f^2(0) &= f^2(0) + 2f(0) - \frac{1}{4} \\ f^2(0) - f(0) + \frac{1}{4} &= 0 \\ \big(f(0) - \frac{1}{2}\big)^2 &= 0, \\ \end{aligned}$$

which gives us $f(0) = \frac{1}{2}.$ Now, we can obtain $f(x)$ by setting $y=0:$

$$\begin{aligned} f(x)+2f^2(0)+x &= f^2(x)+2f(0)-\frac{1}{4} \\ f^2(x)-f(x)+\frac{1}{4}-x &= 0.\\ \end{aligned}$$

Solving this quadratic equation gives us $f(x) = \frac{1}{2} \pm \sqrt{x}.$