Given $f(0)=f(1)=0$ and $\int_{0}^{1} f^2(x)dx=1$, evaluate $\int_{0}^{1} xf(x)f'(x)dx$ 
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?

 A: The hypothesis on $f(0)$ is unnecessary here. Also note that we only need $f$ to be differentiable with integrable derivative, so $C^1$ is definitely not necessary, but sufficient as any continuous function on $[0,1]$ is integrable on $[0,1]$. Put $I = \int_0^1xf(x)f'(x)\,dx$. By integration by parts,
\begin{align*}
I &= xf(x)^2\bigg|_0^1 - \int_0^1f(x)[f(x) + xf'(x)]\,dx \\
&= f(1) - \int_0^1 f(x)^2\,dx - \int_0^1xf(x)f'(x)\,dx \\
&= -1- I.
\end{align*}
Hence $2I = -1$, so $I = -1/2$.
Another way to do this integral is to notice that, by the Chain Rule, $f(x)f'(x) = \frac{1}{2}\big(f(x)^2\big)'$. Integrating by parts,
\begin{align*}
I = \frac{1}{2}\bigg[xf(x)^2\bigg|_0^1 - \int_0^1f(x)^2\,dx\bigg] = \frac{1}{2}[0 - 1] = -\frac{1}{2}.
\end{align*}
A: 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.
