Proving the existence of $P$ $\in$ $\mathbb{R}[X]$ , such that : $\int_{0}^{1}fP = 0$ I need help with this problem.
Let $f$ be a continuous function defined on $[0,1]$, suppose that there exists two numbers $a$ and $b$ such that $f(a)f(b)<0$. Prove that there exist $P \in \mathbb{R}[X]$, a strictly positive polynomial on $[0,1]$, such that: $\int_{0}^{1}fP = 0$
Thank you in advance.
 A: It is sufficient to find two positive polynomials $P_1,P_2$ such that $\int_0^1 fP_1 < 0 < \int_0^1 fP_2$, and we will see why.
While I seek out an easier route, let me mention this one : given $g \geq 0$ on $[0,1]$, the Bernstein construction shows that there exist non-negative polynomials $P_n$ such that $P_n \to g$ uniformly on $[0,1]$ (because $g$ values are used in the construction and these are non-negative). But given any non-negative polynomial $P$, simply consider the polynomial $P + \frac 1n$, this is a family of positive polynomials uniformly coming down to $P$. In conclusion, given $g \geq 0$ there exists a family of positive polynomials converging uniformly to $g$ (diagonal sequence).
Now, suppose that $\int fP > 0$ for all positive polynomials $P$. Then, by density and uniform convergence implying integral convergence, $\int fg \geq 0$ for all positive continuous functions $g$. This contradicts $f(a) < 0$, since one can take $g$ to be zero except in a a neighbourhood of $a$ in which $f$ is negative, and hence get a contradiction. 
Thus, for some positive polynomial $P_1$ we have $\int fP_1 < 0$. Using $b$ in a similar way gives the existence of a positive polynomial $P_2$ such that $\int fP_2 > 0$.
Finally, consider the family of polynomials $Q_t = tP_1 + (1-t)P_2$, $t \in [0,1]$. This is a family of positive polynomials (because for every $t$ we have $Q_t \geq \min\{P_1,P_2\} > 0$), and note that $\int fQ_0 < 0$ and $\int fQ_1 > 0$. The proof is finished once we observe that $t \to \int fQ_t$ is a continuous function (uniform convergence and all that) and use IVT.
As to the explicit construction of $P_1,P_2$ : I'd like to see it, I thought about it for some time and couldn't come up with something at all.
