Let $f: [0, +\infty)\to \mathbb{R}$ be a function such that for one $k\in [0, +\infty)$: $$f^2(x)=k^2+x\cdot f(x+k) \quad \forall x\in [k, +\infty) \tag 1 \label 1$$ and $$\frac{x+k}{2}\le f(x) \le 2\cdot (x+k) \quad \forall x\in [k, +\infty) \tag 2 \label 2$$ Find all such functions $f$.
I have tried the following:
From \eqref{2}, with substitution $x=-k$ we get $0\le f(-k) \le 0$, so $f(-k)=0$. Then, from \eqref{1} with substitution $x=-k$ we get $0=k^2-k\cdot f(0)$, so $f(0)=k$, which is easily verifiable even when $k=0$.
I also see that $f(x)=x+k$ is a valid function. Any hint how to find ALL such functions? (I believe the above is the only function.)
Edit: As Hagen Von Eitzen noted, I cannot use the substitution $x=-k$, because both $x$ and $k$ are non-negative numbers...
If we require that $(1)$ and $(2)$ hold for all $x\ge 0$, then $f(x)=x+k$ is the only solution. (It is a solution in the first place because clearly $(x+k)^2=k^2+x(x+2k)$ and $\frac{x+k}{2}\le x+k\le 2(x+k)$).
First consider the case $k=0$. Then $(1)$ translates to $f(x)^2=xf(x)$, so $f(x)=x$ or $f(x)=0$; and $(2)$ becomes $\frac x2\le f(x)\le 2x$ so that indeed $f(x)=x$ for all $x\ge 0$.
Assume $k>0$. For $x\ge 0$ let $c(x)=\frac{f(x)-(x+k)}{k}$. Then $$\tag3-\frac{x+k}{2k}\le c(x)\le \frac{x+k}{k}$$ For $x>0$ we have $$\begin{align}f(x+k)&=\frac{f(x)^2-k^2}{x}\\&=\frac{(x+(c(x)+1)k)^2-k^2}{x}\\&=\frac{x^2+2(c(x)+1)kx_0+((c(x)+1)^2-1)k^2}{x}\\ &=x+2k\,+\,2c(x)k+\frac{c(x)(c(x)+2)k^2}{x}\end{align}$$ i.e., $$c(x+k)=2c(x)+\frac{c(x)(c(x)+2)k}{x} $$ If for some $x>0$ we have $c(x)>0$ this implies $c(x+k)>2c(x)$ and by induction $c(x+nk)>2^nc(x)\to\infty$. As exponentials grow faster than polynomials, we obtain a contradiction with $(3)$. We conclude $c(x)\le 0$ (that is: $f(x)\le x+k$) for $x>0$.