Suppose that $f, g,h:[0,1]\rightarrow \mathbb{R}$ are functions that satisfy $f,g\geq 0$ and $$\int_0^1 f(t)h(t)dt = \int_{0}^1 g(t)h(t)dt.$$ What are necessary and sufficient conditions on $h$ to ensure that $$\int_0^1f(t)dt = \int_0^1g(t)dt?$$
EDIT: (Some thoughts:) I thought maybe if $h>0$, this would be enough. However, I was shown that, for example, if $ f = 1/h $ and $g = 1/\left(\int h\right)$, then $$\int fh = \int gh.$$ In this case, for $\int f = \int g$ to be satisfied, $h$ must satisfy $$\int \frac{1}{h} = \frac{1}{\int h}$$ and of course many $h>0$ do not satisfy that condition (e.g. $h(t) = 1+t$). Since, as user251257 points out, $h(t) \equiv1$ is sufficient, I was curious what the answer to the above might be.
(Where this question came from) I originally came across this question when looking at what can be said when you have solutions $y_i$ and $y_2$ to the Ricatti equations $y_i' + y^2_i + r_i =0$ on the interval $[a,b]$ that satisfy $y_1(a) = y_2(a)$ and $y_1(b) = y_2(b)$. In this case, you can write $$0 = g(y_2(t)-y_1(t))|_a^b = \int_a^b g(r_1(t)-r_2(t))dt$$ where $g$ is a function that satisfies $g' = (y_1 + y_2)g$. So, I wanted to claim that this means $\int_a^b r_1(t)dt = \int_a^b r_2(t)dt$, and in the process, I realized I didn't know the answer to the question above.
Here's some a bit heuristic justification for why I don't expect anything more useful than $h$ being constant to work: think of the set of integrable functions $[0,1]\to\mathbb{R}$ as a vector space. Then what you're saying is that we have some element $f-g$ of that space such that $\langle f-g, h\rangle = 0$, i.e. $f-g\in h^\perp$ and you're asking for conditions on $h$ which would imply that $\langle f-g, 1\rangle = 0$, i.e. $f-g\in 1^\perp$. Now if $h$ and $1$ are not proportional to each other, there's no way for that implication to work.
Note that $f,g\geq 0$ doesn't change the generality of the above argument, since any element of our vector space can be written as a difference of nonnegative elements.