A continuous function integral equality I'd like to prove the statement below.
Suppose $f(x)$ is continuous on $[a,b]$, and $f(a)=f(b)$ is the minimum, then there exists $c\in(a,b)$ such that $\int_{a}^{c} f(x) dx = (c-a)f(c)$.
I tried using mean value theorem of integral, but couldn't see how to find $c\in(a,b)$ satisfying the equality.
Any help will be appreciated.
 A: We could assume that $a=0$ for simplicity. We can further assume that $f(a)=f(b)=0$ by considering $f(x)-f(a)$.
So $f$ is assumed to be nonnegative throughout and that $f(0)=0$, $f(b)=0$.
Consider $\varphi(x)=\displaystyle\int_{0}^{x}f(t)dt-xf(x)$. If $\varphi(x)=0$ for some $x\in(0,b)$ then we are done.
Consider $\varphi(b)=\displaystyle\int_{0}^{b}(f(t)-f(b))dt\geq 0$. If it were $\varphi(b)=0$, then $f(t)=f(b)$ for all $t\in[0,b]$ since the integrand is nonnegative and we are done in this case.
So we assume that $\varphi(b)>0$. If $\varphi(x)<0$ for some $x\in(0,b)$, then by Intermediate Value Theorem we are done in this case.
Now we assume that $\varphi(x)>0$ for all $x\in(0,b]$.
Let $F(x)=\displaystyle\int_{0}^{x}f(t)dt$, then $\varphi(x)=F(x)-xF'(x)=-x^{2}\left(\dfrac{F(x)}{x}\right)'$ and hence $\left(\dfrac{F(x)}{x}\right)'<0$ and hence
\begin{align*}
\int_{\epsilon}^{x}\left(\dfrac{F(t)}{t}\right)'&\leq 0\\
\dfrac{F(x)}{x}-\dfrac{F(\epsilon)}{\epsilon}&\leq 0\\
F(x)&\leq x\cdot\dfrac{\displaystyle\int_{0}^{\epsilon}f(t)dt}{\epsilon}\\
F(x)&\leq xf(x_{\epsilon}),
\end{align*}
where $x_{\epsilon}\in(0,\epsilon)$. Now taking $\epsilon\rightarrow 0$ we have $F(x)\leq 0$, but $f$ is nonnegative we must have $F(x)\geq 0$ and hence $f(x)=0$.
