I am currently trying to solve a maximization problem given by
$\max_{f(x)} \int_0^1 \int_\mathbb{R} (c-y\cdot f(x)-d\cdot (x+f(x)-b)^2) \ h(x) \ dx \ dy$.
Or in other words, I have a utility function $U(f(x)):=c-y\cdot f(x)-b\cdot (x+f(x)-b)^2$ whereas $x$ and $y$ are random variables and the other deterministic variables are given. $x$ has a normal distribution (with density $h$) and $y$ is uniformly distributed on $[0,1]$. The expected utility should be the integral I'm trying to maximize above.
I have no idea how to find the optimal $f^*(x)$, since I have only worked with optimizations over variables and not functions so far. Are there any theorems or "keywords" that you could point me to that would help me solve this problem?
I once read something about a maximand being separable in a variable $x$, so choosing an optimal function $f^*(x)$ becomes equivalent to choosing an optimal $f^*$ but I don't know why that is so I am not sure if that applies to the problem above, too.
I'd be very grateful for any help! (and I apologize in advance in case I have mis-tagged this post - like I said, I am looking for the right "keywords" that could help me solve my problem)