Finding function $f(x),$ if some conditions are given 
If $f(x)$ is a defined in $[0,1]$ such that $\displaystyle \int^{1}_{0}(f(x))^2\,dx=4$
and $\displaystyle \int^{1}_{0}f(x)\,dx=\int^{1}_{0}x\cdot f(x)\,dx=1,$
then what is the value of $\displaystyle \int^{1}_{0}(f(x))^3\,dx?$

Try: First thing in my mind is to use the Cauchy-Schwarz Inequality for Integrals:
$$\int^{1}_{0}x^2\,dx\cdot \int^{1}_{0}\left(f(x)\right)^2dx\geq \left(\int^{1}_{0}xf(x)dx\right)^2.$$
But here the inequality  condition is not satisfied.
I did not understand how I think other way could help me to solve it.
 A: $\newcommand\ip[2]{\langle #1,#2\rangle}$ 
I was surprised that the question actually does have a unique answer. Consider the inner product defined by $\ip gh=\int_0^1 g\overline h$.
Apply Gram-Schmidt to the functions $1$ and $x$ to get two orthonormal functions with the same span. The result is $$b_1=1,\quad b_2(x)=\sqrt{12}(x-1/2).$$
Since $b_1$ and $b_2$ are orthonormal we must have $$f=\alpha b_1+\beta b_2+g,$$where $$\ip g{b_1}=\ip  g{b_2}=0.$$
You can now calculate $\alpha$ and $\beta$: $$\alpha=\ip f{b_1}=1,$$ $$\beta = \ip  f{b_2}=\sqrt 3.$$Now $$4=||f||^2=|\alpha|^2+|\beta|^2+||g||^2,$$so $g=0$. So you know exactly what $f$ is, and you can calculate  $\int_0^1f^3$.
A: The following approach works.
Assume that $f(x)=mx+c$. Try and force $f$ to satisfy your conditions. It can satisfy all of them if $f(x)=6x-2$.
Now 
$$\int_0^1 (f(x))^3\,dx=10.$$
Assume that there is another function $f_1$ that satisfies the conditions and consider
$$\int_0^1 |6x-2-f_1|^2\,dx.$$
We have $\int_0^1 |g|^2\,dx=0\Rightarrow g=0$.
Note 
$$\int_0^1|6x-2-f_1|^2\,dx=\int_0^1 f_1^2\,dx-12\int_0^1x\cdot f_1\,dx+\int_0^1(36x^2-24x+4)\,dx\\+4\int_0^1f_1\,dx.$$
This equals zero and so $f_1=6x-2$.
