Find max of $f(x)=12x^2\int_0^1yf(y)dy+ 20x\int_0^1y^2f(y)dy+4x$ 
Let $$f(x)=12x^2\int_0^1yf(y)dy+ 20x\int_0^1y^2f(y)dy+4x$$
  Find the maximum value of $f(x)$

I wrote the two integrals as $I_1$ and $I_2$ since they are constants and differentiated the equation and put it to $0$. Then I tried writing one integral in terms of the other. But I could not get the required answer.
I am in 12th and it came in one of my tests.
 A: Let $$a = \int_{0}^{1}yf(y)dy$$ and $$b=\int_{0}^{1}y^2f(y)dy$$
So we get $$f(x) = 12ax^2+20bx+4x=12ax^2+(20b+4)x.$$
Now Given $$a=\int_{0}^{1}x\left[12ax^2+(20b+4)x\right]dx=3a+\frac{20b+4}{3} \tag{1}$$
and Given $$b=\int_{0}^{1}x^2\left[12ax^2+(20b+4)x\right]dx=\frac{12a}{5}+\frac{20b+4}{4}\tag{2}$$
Now solve for $a$ and $b$
A: $ \int_{0}^{1} x f(x) dx =
  \left(\int_{0}^{1} 12x^{3} dx \right)
  \left( \int_{0}^{1} y f(y) dy \right)+
  \left( \int_{0}^{1} 20x^{2} dx \right)
  \left( \int_{0}^{1} y^{2} f(y) dy \right)+\int_{0}^{1} 4x^{2} dx$
$ \int_{0}^{1} x^{2} f(x) dx =
  \left( \int_{0}^{1} 12x^{4} dx \right)
  \left( \int_{0}^{1} y f(y) dy \right)+
  \left( \int_{0}^{1} 20x^{3} dx \right)
  \left( \int_{0}^{1} y^{2} f(y) dy \right)+
  \int_{0}^{1} 4x^{3} dx$
Therefore,
$$I_{1} = 3I_{1}+\frac{20}{3} I_{2}+\frac{4}{3}$$
$$I_{2} = \frac{12}{5}I_{1}+5I_{2}+1$$
On solving,
$$I_{1}=-\frac{1}{6}$$
$$I_{2}=-\frac{3}{20}$$
Hence, $$f(x)=-2x^{2}+x=\frac{1}{8}-2\left( x-\frac{1}{4} \right)^{2}$$
