Consider the interval $I=(0,1)$ and let $f,g$ be two linearly independent continuous functions on $[0,1]$. 


I am asking if there is a continuous function $h$ such that 
$$\int\_0^1 h(s) f(s) ds=0$$


$$\int\_0^1 h(s) g(s) ds \neq 0$$


and $h(0)=h(1)=0$.


If it were only the first two conditions, then Gram-Schmidt orthogonalization would do the job, but it seems to be difficult to incorporate the third condition in this framework.



Prove existence of continuous function on $(0,1)$ with special properties
I guess you can just work with the measure $d\mu(x) = x(1-x)\, dx$. By Gram-Schmidt, there is a function $\tilde{h}$ such that
$$
\int\_0^1 \tilde{h}(x) \, f(x) \, x(1-x) \, dx =0,
$$
$$
\int\_0^1 \tilde{h}(x) \, g(x) \, x(1-x) \, dx \neq 0.
$$
The function $\tilde{h}$ is explicit, using the scalar product given by $\mu$.
$$
\tilde{h} = g - {\langle g, f\rangle \over \langle f, f \rangle} f.
$$
Then take $h(x) = x(1-x)\tilde{h}(x)$.


