TITLE: Given $f(0)=f(1)=0$ and $\int_{0}^{1} f^2(x)dx=1$, evaluate $\int_{0}^{1} xf(x)f'(x)dx$
QUESTION [5 upvotes]: Q.Suppose $f$ is a real valued continuously differentiable function on $[0,1]$ with $f(0)=f(1)=0$ and $$\int_{0}^{1} f^2(x)dx=1.$$ Find the value of $\int_{0}^{1} xf(x)f'(x)dx$?

My approach :
Let $I(x)$ be the antiderivative of $xf(x)f'(x)$ and $G(x)$ be the antiderivative of $f^2(x)$, here $f^2(x) = (f(x))^2$. We want to calculate $I(1)-I(0)$ and we know that $G(1)-G(0)=1.$
Then using integration by parts, 
$$\begin{align}
I(x)&=xf(x)\int f'(x)dx-\int \left(\int f'(x)dx\right)\left(\frac {d}{dx} xf(x)\right)dx \\
&=xf^2(x)-\int f(x)(xf'(x)+f(x))dx\\
&=xf^2(x)-I(x)-\int f^2(x)dx \\
\Rightarrow 2I(x)&=xf^2(x)-\int f^2(x)dx \\
\Rightarrow I(x)&=\frac {xf^2(x)-\int f^2(x)dx}2\\
&=\frac {xf^2(x)-G(x)}2.
\end{align}$$
$\displaystyle \therefore I(1)-I(0)=\frac {1f^2(1)-G(1)}2 - \frac {0f^2(0)-G(0)}2=-\frac {G(1)-G(0)}2=-\frac 12.$

In my approach above, I didn't apply hypothesis $f(0)=0$ anywhere. I didn't understand where I used the given fact that $f$ is a continuously differentiable function on $[0,1]$. So I feel that my solution is ambiguous. 

What are errors in my proof?
Can the two hypotheses which I mentioned be dropped safely?

REPLY [2 votes]: Let $u = f^2(x)$, $dv = dx$ then we can perform integration by parts on the original integral
$$ \int_0^1 f^2(x)\ dx = x\ f^2(x) \bigg|_0^1 - \int_0^1 x (2f(x) f'(x))\ dx = 1  $$
Thus 
$$  \int_0^1 xf(x)f'(x)\ dx = \frac{1}{2}\left(x\ f^2(x) \bigg|_0^1 -1\right) $$
The function values are inconsistent in your post title and question. If $f(1) = 1$ than the answer is $0$, if $f(1)=0$ then it's $-1/2$. In either case the value of $f(0)$ is unimportant.