Q:

Denseness of functions in a subspace of $C^1$

Let $K:=\{f\in C^1[0,1]| f(0)=f(1)=0\}$. I want to show that the functions of the form $x(1-x)f(x)$ with $f\in C^1[0,1]$ are dense is $K$ using the $C^1[0,1]$ norm. I am not sure even if this is true. I want to use this to show that the polynomials of the form $x(1-x)p(x)$ ($p(x)$ is a polynomial) are dense in $K$.
So basically I have to show that for every $g\in K$ and for every $\epsilon>0$ there exists $f\in C^1[0,1]$ such that $\|g-x(1-x)f(x)\|_{C^1[0,1]}<\epsilon$. 
I know that polynomials are dense in $C^1[0,1]$ and I was hoping to use that for $x(1-x)$ part but since $f$ is multiplied by it I have no idea how I can use triangle inequality to break the norm. 

A:

Let $\epsilon>0$ and choose a polynomial $\gamma$ such that
$|f'(x) - \gamma(x)| < {1 \over 2} \epsilon$ for all $x$.
Let $d = \int_0^1 \gamma(x)dx$ and note that
$\int_0^1 (f'(t)-\gamma(t))dt = -\int_0^1 \gamma(t)dt = -d$ and
so $|d| < {1 \over 2} \epsilon$.
Let $\tilde{\gamma}(x) = \gamma(x) -d $ and note that
$|f'(x) - \tilde{\gamma}(x)| < \epsilon$ for all $x$ and
$\int_0^1 \tilde{\gamma}(t) dt = 0$.
Define $p(x) = \int_0^x \tilde{\gamma}(t)dt$, note that $p$ is
a polynomial, $p(0) = p(1) = 0$ and 
$|f(x)-p(x)| < \epsilon$ for all $x$.
Since $p(0)=p(1)$ we can write $p(x) = x(1-x) q(x)$ for some
polynomial $q$.
Hence polynomials of the form $x \mapsto x(1-x) q(x)$ are
$C^1[0,1]$ dense in $K$.

