For the problem, A retailer sells a perishable commodity and each day he places an order for Q units. Each unit that is sold gives a profit of 60 cents and units not sold at the end of the day are discarded at a loss of 40 cents per unit. The demand, D, on any given day is uniformly distributed over [80,140]. How many units should the retailer order to maximize expected profit?
I know how to find the formula to calculate the expected value, but I was wondering how do I then find Q. I found E(P) = 1.60* [integral from Q to 140 of .6*D*dD + integral from 80 to Q of .6QD-.4*(Q-D)*dD)