Hello,

I have a problem which I spent some time trying to solve and simply cannot do that. I will greatly appreciate help and/or direction to resources from where I can learn needed math.

I have a random variable Y which is uniformly distributed between -0.5 and 0.5. And a function f(X)= (Z + Y - X)^2. I need to maximize this function with respect to X and find solution which is a function itself: X(Z). Z is a variable I can assign any value and draw X(Z). X and Y are dependent.

I know that once I take expectations of this function f(X) I will have an integral with respect to the distribution function of Y. Is that correct? And then I need to find the first order condition differentiating this integral?

How to write this integral properly and how to differentiate it properly? How will the F.O.C. look like?

Hope to hear from you..

best

pingwin3