Prove that $\int_0^1\left|f\left(x\right)\right|^2\text{d}x\le\frac12\int_0^1\left(1-x^2\right)\left|f'\left(x\right)\right|^2\text{d}x$. 
Let $f:[0,1]\to\mathbb{C}$ be a continuously differentiable function with $f(0)=0$.  Prove that $$\int_0^1{\left| f\left( x \right) \right|^2\text{d}x\le \frac{1}{2}\int_0^1{\left( 1-x^2 \right) \left| f'\left( x \right) \right|^2\text{d}x}}\,.$$
And the equals sign holds if and only if $f\left( x \right) =cx$.

Edited: I have solved the problem and posted an answer.
 A: Sorry again for copying the wrong questions.  First observe that
$$\left| f\left( x \right) \right|^2=\left( \int_0^x{f'\left( t \right) \text{d}t} \right) ^2\le x\int_0^x{\left| f'\left( t \right) \right| ^2\text{d}t}\,.$$
Therefore,
$$\begin{align}\int_0^1{\left| f\left( x \right) \right|^2\text{d}x }&\le{\int_0^1{\text{d}x}}\int_0^x{x\left| f'\left( t \right) \right| ^2\text{d}t}
\\&=\int_0^1{\text{d}t\int_t^1{x}}\left| f'\left( t \right) \right| ^2\text{d}x
\\&=\frac{1}{2}\int_0^1{\left( 1-t^2 \right) \left| f'\left( t \right) \right| ^2\text{d}t}\,.\end{align}$$
A: In this solution, it is assumed that $f(0)=0$ is a constraint.  I also assume that $f'\in \mathcal{L}^2\big([0,1]\big)$.  The OP's solution is much better.
Note that $$\begin{align}\int_0^1\,\big|f(x)-x\,f'(x)\big|^2\,\text{d}x&=\int_0^1\,\big|f(x)\big|^2\,\text{d}x+\int_0^1\,x^2\,\big|f'(x)\big|^2\,\text{d}x\\&\phantom{abcdefg}-\int_0^1\,x\,\left(\frac{\text{d}}{\text{d}x}\,\big|f(x)\big|^2\right)\,\text{d}x\,.\end{align}$$
Using integration by parts, we get
$$\int_0^1\,x\,\left(\frac{\text{d}}{\text{d}x}\,\big|f(x)\big|^2\right)\,\text{d}x=\big|f(1)\big|^2-\int_0^1\,\big|f(x)\big|^2\,\text{d}x\,.$$
Thus,
$$\int_0^1\,\big|f(x)-x\,f'(x)\big|^2\,\text{d}x=2\,\int_0^1\,\big|f(x)\big|^2\,\text{d}x+\int_0^1\,x^2\,\big|f'(x)\big|^2\,\text{d}x-\big|f(1)\big|^2\,.$$
Hence, the required inequality is equivalent to
$$\int\,\big|f(x)-x\,f'(x)\big|^2\,\text{d}x\leq \int_0^1\,\big|f'(x)\big|^2\,\text{d}x-\big|f(1)\big|^2\,.\tag{*}$$
Observe that
$$\begin{align}\left(\int_0^1\,\big|a(x)\big|^2\,\text{d}x\right)\,\left(\int_0^1\,\big|b(y)\big|^2\,\text{d}y\right)&-\left|\int_0^1\,a(x)\,\overline{b(x)}\,\text{d}x\right|^2\\&=\int_0^1\,\int_0^x\,\big|a(x)\,b(y)-a(y)\,b(x)\big|^2\,\text{d}y\,\text{d}x\,.\end{align}$$
Therefore,
$$\begin{align}\left(\int_0^1\,\big|f'(x)\big|^2\,\text{d}x\right)\,\left(\int_0^1\,1^2\,\text{d}y\right)&-\left|\int_0^1\,f'(x)\cdot\bar{1}\,\text{d}x\right|^2 \\&=\int_0^1\,\int_0^x\,\big|f'(x)\cdot 1-f'(y)\cdot 1\big|^2\,\text{d}y\,\text{d}x\,,\end{align}$$
or
$$\int_0^1\,\big|f'(x)\big|^2\,\text{d}x-\big|f(1)\big|^2 =\int_0^1\,\int_0^x\,\big|f'(x)-f'(y)\big|^2\,\text{d}y\,\text{d}x\,,$$
as $f(0)=0$.  Note from the Cauchy-Schwarz Inequality that, for $\phi\in\mathcal{L}^2\big([0,1]\big)$ and $x\in[0,1]$, we have
$$\begin{align}\int_0^x\,\big|\phi(y)\big|^2\,\text{d}y&\geq \left(\int_0^x\,\big|\phi(y)\big|^2\,\text{d}y\right)\,\left(\int_0^x\,1^2\,\text{d}y\right)\\&\geq \left|\int_0^x\,\phi(y)\cdot 1\,\text{d}y\right|^2=\left|\int_0^x\,\phi(y)\,\text{d}y\right|^2\,.\end{align}$$
Consequently,
$$\begin{align}\int_0^1\,\int_0^x\,\big|f'(x)-f'(y)\big|^2\,\text{d}y\,\text{d}x&\geq \int_0^1\,\left|\int_0^x\,\big(f'(y)-f'(x)\big)\,\text{d}y\right|^2\,\text{d}x
\\&=\int_0^1\,\big|f(x)-x\,f'(x)\big|^2\,\text{d}x\end{align}\,.$$
Ergo,
$$\int_0^1\,\big|f'(x)\big|^2\,\text{d}x-\big|f(1)\big|^2\geq \int_0^1\,\big|f(x)-x\,f'(x)\big|^2\,\text{d}x\,,$$
which is precisely (*).
The equality holds if and only if $f'(x)=f'(y)$ for almost every $(x,y)\in[0,1]\times[0,1]$.  That is, $f'$ is constant almost everywhere.  Because $f(0)=0$, we conclude that there exists a constant $c$ such that $f(x)=cx$ for every $x\in[0,1]$.
