TITLE: Denseness of the set $\{f: \int_0^1 x^\alpha f''(x) dx = \int_0^1 x^\beta f''(x) dx = 0 \}$ in $C[0,1]$
QUESTION [6 upvotes]: Let $\alpha, \beta \in (-1,1) \setminus \{ 0 \}$. Is it true that the set
$$
\left\{f \in C^2[0,1]: \int_0^1 x^\alpha f''(x) dx = \int_0^1 x^\beta f''(x) dx = 0 \right\}
$$
is dense in $C[0,1]$? I think it is not, but have no idea how to prove it. In case $\alpha, \beta \geq 1$ it is quite easy since we can use integration by parts twice and rewrite the condition without derivatives, but I do not know what to do if $\alpha, \beta < 1$.

REPLY [2 votes]: Your set seems to be indeed dense in $\mathcal C([0,1])$. Without loss of generality, assume that $\alpha\neq \beta$.
We need the following fact:
$\mathbf{Fact.}$ Given a compact set $K\subset\mathbb R^2$, there is a constant $C$ such that the following holds: for any $(p,q)\in K$ and $A>1$, one can find a function $\Phi\in \mathcal C^2([0,A])$ such that $\int_0^{A} \Phi''(t)t^\alpha dt=p$, $\int_0^{A}\Phi''(t)t^\beta dt=q$ and $\Vert\Phi\Vert_\infty\leq C$.
Assuming this has been proved, let us show that your set (call it $\mathcal A$) is dense in $\mathcal C([0,1])$.
By something like Weierstrass theorem, it is enough to approximate any $\mathcal C^2$ function; so let us fix $f\in\mathcal C^2([0,1])$ and $\varepsilon \in (0,1)$. 
Put $L_\alpha(f)=\int_0^1 f''(x)x^\alpha dx$ and $L_\beta(f)= \int_0^1 f''(x)x^\beta dx$. Choose $\gamma >0$ such that $\gamma(1-\alpha)>1$ and $\gamma(1-\beta)>1$ By the above fact applied with $K=\{ (p,q);\; \vert p\vert\leq \vert L_\alpha(f)\vert\;{\rm and}\; \vert q\vert\leq  \vert L_\beta(f)\vert \}$, one can find a function $\Phi\in\mathcal C^2([0,{\varepsilon^{-\gamma}}])$ such that $\int_0^{{\varepsilon^{-\gamma}}} \Phi''(t)t^\alpha dt=\varepsilon^{\gamma(1-\alpha)-1}L_\alpha(f)$, $\int_0^{{\varepsilon^{-\gamma}}}\Phi''(t)t^\beta dt=\varepsilon^{\gamma(1-\beta)-1}L_\beta(f)$ and $\Vert\Phi\Vert_\infty\leq C$, where $C$ does not depend on $\varepsilon$. Now define $g$ on $[0,1]$ by $g(x)=f(x)-\varepsilon\, \Phi({\varepsilon^{-\gamma}}x)$. Then $g\in\mathcal C^2([0,1])$ and $\Vert g-f\Vert_\infty\leq C\varepsilon$. Moreover,
\begin{eqnarray*}\int_0^1 g''(x)x^\alpha\, dx&=&L_\alpha(f)-\varepsilon^{1-2\gamma}\int_0^1\Phi''({\varepsilon^{-\gamma}}x)x^\alpha dx\\
&=&L_\alpha(f)- \varepsilon^{1-\gamma+\gamma\alpha}\int_0^{\varepsilon^{-\gamma}}\Phi(t) t^\alpha\, dt\\&=&0\, ,
\end{eqnarray*}
and likewise $\int_0^1 g(x)x^\beta dx=0$. So $g\in\mathcal A$, and since $C$ does not depend on $\varepsilon$, this shows that $\mathcal A$ is dense in $\mathcal C([0,1])$.
To prove the fact, we first note that given $p,q\in\mathbb R$, one can find a quadratic function $\psi(x)=ax^2+bx+c$ such that $\int_0^{1} \psi(x)x^\alpha dx=p$, $\int_0^{1}\psi(x)x^\beta dx=q$, $\psi(1)=0$ and $\vert a\vert+\vert b\vert+\vert c\vert\leq M (\vert p\vert+\vert q\vert)$, where $M$ is a constant depending only on $(\alpha,\beta)$. Indeed, this amounts to solving the linear system 
$$\left\{
\begin{matrix}\frac{1}{\alpha+3}& a&+&\frac{1}{\alpha +2}& b&+&\frac{1}{\alpha +1}& c&=&p\\
\frac{1}{\beta+3}& a&+&\frac{1}{\beta +2}& b&+&\frac{1}{\beta +1}& c&=&q\\
&a&+&&b&+&&c&=0
\end{matrix} \right. $$
whose matrix depend only on $(\alpha,\beta)$ and turns out to be invertible (I'm skipping some row manipulations here). 
It follows that for any $(p,q)\in\mathbb R^2$ and any $A>1$, one can find a function $\varphi\in\mathcal C([0,A])$ such that $\int_0^A \varphi(t)
t^\alpha dt=p$, $\int_0^A\varphi(t) t^\beta dx=q$, $\varphi\equiv 0$ on $[1,A]$ and $\Vert\varphi\Vert_\infty\leq M(\vert p\vert+\vert q\vert)$ for some constant $M$ which does not depend on $(p,q)$: just define $\varphi$ to be equal to the above quadratic function $\psi$ on $[0,1]$ and $\varphi\equiv 0$ on $[1,A]$.
Now, let $K$ be an arbitrary compact subset of $\mathbb R^2$ and let $A>1$. For any $(p,q)\in K$, define $\Phi:[0,A]\to \mathbb R$ by $\Phi(t)=\int_1^t\int_1^s \varphi (u) du$, where $\varphi$ is as above. Then $\Phi\equiv 0$ on $[1,A]$, so $\Vert\Phi\Vert_\infty\leq C$ for some constant $C$ depending only of $K$; and $\Phi$ does the job.