Question: NewsVendor Problem solution for general Demand distribution

Hi, 
I want to solve a simple newsvendor problem for general Demand Probability Distribution with maple code.
let, 
Underage cost 
                              c[u]

Overage cost 
                              c[o]

Demand (
D;
) follows pdf 
f(.);
 and CDF 
F;

(.);


Decision varible is quantity 
q;


So cost function is 

TC := piecewise(q-D >= 0, c[o]*(q-D), q-D < 0, c[u]*(-q+D));
 piecewise(0 <= q - D, c[o] (q - D), q - D < 0, c[u] (-q + D))

After taking expectation of TC and derivating it w.r.t q we will get 
q;
* as critical fractile i.e.

q*= F^(-1) (
                             c[u]    
                          -----------
                          c[u] + c[o]
)      i.e. F inverse (
c[u]/(c[u]+c[o]);
)

Can someone please help me how to find q* in MAPLE using solve() or any other function?

 

Thanks in Advance!

Please Wait...