Maximise $f(x) = 4x + \int_0^1 [(12x + 20y)xy f(y)] \,dy$ in this question I am given a function
$$f(x) = 4x + \int_0^1 [(12x + 20y)xy f(y)]  \,dy= 0$$
And question asks to find the maximum value of $$8f(x)$$
My approach: I tried applying Leibniz Integral Rule but the limits of the integral are definite that is 0 and 1. Also there are two variables inside the integration(x and y). But I think that can be sorted out by taking x as a constant since we are integrating y. So I also tried simplifying the integral before solving it but was not able to solve it. For $$f(x)$$ to be maximum $$f'(x) = 0$$ So that was my approach. I'd like to know where I am going wrong and also if there would be a way to somehow graph this function. I've being trying it for quite a while. Any help would be greatly appreciated!
(I am a 12th grade student)
 A: I like this question a lot!
Your intuition is good; we want to know where $f'(x)=0$, but the issue is that we can't evaluate the integral of $f$, since this depends on $f$ itself. In particular, if we define the two constants
$$C=\int_0^1yf(y)dy,\;\;\;\;D=\int_0^1y^2f(y)dy$$
then our equation reads
$$f(x)=4x+12x^2C+20xD$$
If we multiply this equation by $x$ and integrate from $0$ to $1$, then the left side becomes $C$, so we have
$$C=\frac{4}{3}+3C+\frac{20}{3}D$$
Similarly, we could multiply by $x^2$ and integrate to get $D$ on the left, so we have
$$D=1+\frac{12}{5}C+5D$$
Now we have two equations with two unknowns, $C$ and $D$, so we can solve for these values. Once you know $C$ and $D$, you know $f$, so you are good to proceed with your original thought.
A: Yes, this is the same as $f(x)= 4x+ 12x^2\int_0^1 yf(y)dy+ 20x\int_0^1 y^2f(y)dy$ and the integrals are constants with respect to x.
$f'(x)= 4+ 24x\int_0^1 yf(y)dy+ 20\int_0^1 y^2f(y)dy= 0$
$24x\int_0^1 yf(y)dy= -4- 20\int_0^1 y^2f(y)dy$
$x= \frac{-4- 20\int_0^1 y^2f(y)dy}{\int_0^1 yf(y)dy}$
Now the problem is evaluating those integrals!
