Let $f: [0,\infty)\to \mathbb{R}$ be a continuous function so that $f(x)(f(x)-1/x \int_0^x f(t) dt) \ge (f(x)-1)^2$ for all $x\in [0,\infty)$. Prove that $f$ equals the constant function $1$.
I know that if $f$ is a continuous function so that $\int_a^b f(x)dx = 0$ and $f(x)\ge 0$ for all $x\in [a,b]$, then $f(x)=0$ identically. We're given that $-f(x)/x \int_0^x f(t) dt \ge -2 f(x) + 1.$ Clearly from the given inequality, we cannot have $f(x) = 0$ for any $x$. First, let's assume $f(x) > 0$ for all x. Then $\dfrac{1}{x}\int_0^x f(t)dt \leq 2 - \frac{1}{f(x)}$. By the Fundamental theorem of calculus, $\dfrac{d}{dx}(\int_0^x f(t)dt) = f(x)$. Also, maybe the EVT (Extreme value theorem) might be useful? Though I'm not sure how to proceed from here.