TITLE: Find max of $f(x)=12x^2\int_0^1yf(y)dy+ 20x\int_0^1y^2f(y)dy+4x$
QUESTION [5 upvotes]: 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.

REPLY [4 votes]: $ \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}$$