The Problem: Let $f,g$ be continuously differentiable on $[0,1],\,f$ monotone, and $g(x)>g(0)=g(1)$ on $(0,1).$ Prove that $$\int_0^1 f(x)g'(x)\,dx=0\quad\text{if and only if }f\text{ is constant.}$$
My Thoughts: I first try the easy direction. So suppose that $f$ is constant, hence there is some $c\in\mathbb R$ such that $f(x)=c$ for all $x\in[0,1]$. Then the fundamental theorem of calculus implies that $$\int_0^1 f(x)g'(x)\,dx=\int_0^1 cg'(x)\,dx=c[g(1)-g(0)]=0.$$ However, I am having difficulty with the other direction. I tried applying integration by parts in the following way $$0=\int_0^1 f(x)g'(x)\,dx=g(0)\left[f(1)-f(0)\right]-\int_0^1 f'(x)g(x)\,dx.$$ Then the Mean Value Theorem implies that there is some $d\in(0,1)$ such that $$f'(d)=\frac{1}{g(0)}\int_0^1 f'(x)g(x)\,dx.$$ I did the above with the idea of showing that $f(1)=f(0)$, which would yield the conclusion. But, I have been stuck for a long time at this point.
Could anyone please give me a hint on how to get going from the point I am at, or if the above is not a correct path, just a small hint on how to start on the right path?
Thank you for your time, and really appreciate all feedback.
You're almost there. Since $f$ is monotone then either $f'\geq 0$ or $f'\leq 0$ on all of $[0,1]$. Let us say the latter is true (otherwise change $f$ by $-f$). Then we have $-f'(x)g(x)\geq f'(x)g(0)$ on $[0,1]$, and \begin{align*} 0&=g(0)[f(1)-f(0)]-\int_0^1 f'(x)g(x)dx\\ &\geq g(0)[f(1)-f(0)]-\int_0^1f'(x)g(0)dx\\ &=0\end{align*} so the inequality in the middle is actually an equality. This means that $$\int_0^1f'(x)g(x)dx=\int_0^1f'(x)g(0)dx$$ or equivalently $$\int_0^1 f'(x)(g(x)-g(0))dx=0.$$ The function $x\mapsto f'(x)(g(x)-g(0))$ is non-positive on $[0,1]$ and has integral $0$, so it must be $0$ on $[0,1]$. Since $g(x)\neq g(0)$ on $(0,1)$ then $f'=0$ on $(0,1)$, and by the Mean Value Theorem $f$ is constant.