I don't know what you expect from Maple (__what do you doubt of as the name of your file seems to mean__)?

Given the abstract definitions of RV x and beta, you have absolutely no chance of finding (if that's what you were hoping for) any closed form expression for **q__ER** nor **Pi__ER**.

Here is the farthest you can go with Maple (and probably with any other CAS or even by hand)

restart:
with(Statistics):
#---------------------------------------------------x
d := Distribution(
PDF = (proc (t) options operator, arrow; f__D(t) end proc),
Quantile = (proc (**q**) options operator, arrow; int(f__D(t), t = -infinity .. q) end proc)
):
x := RandomVariable(d);
F := t -> Quantile(x, t);
F__c := t -> 1- F(t);
t -> Statistics:-Quantile(x, t);
t -> 1 - F(t);
#---------------------------------------------------beta
d1 := Distribution(
PDF = (t -> g__beta(t)),
Quantile = (**q** -> int(g__beta(t), t=-infinity..q))
);
beta := RandomVariable(d1);
G := t -> Quantile(beta, t);
G__c := t -> 1- G(t);
#---------------------------------------------------Pi__ER
Pi__ER := beta__R -> piecewise(
q/(G__c(beta__R)+m*G(beta__R))-x >= 0,
((p-s)*(G__c(beta__R)+m*G(beta__R))-(c-s)*q-(p-s)*(1-m)*G__c(beta__R))*x,
`and`(x-q/(G__c(beta__R)+m*G(beta__R)) > 0, q/G__c(beta__R)-x > 0),
(p-s)*q-(c-s)*q-(p-s)*(1-m)*G__c(beta__R)*x,
x-q/G__c(beta__R) >= 0,
(p-s)*q-(c-s)*q-(p-s)*(1-m)*q);
# Differentiate first and take the mean after
dp := diff(Pi__ER(beta__R), q);
# write the conditions under simpler forms
UV := [ op(1, rhs(op(1, dp))) = U, -op(1, rhs(op(-2, dp))) = V ];
dpUV := eval(dp, UV);
# simplify the writing of dpUV
dpUV := piecewise(_R <= U, op(2, dpUV), _R < V, op(4, dpUV), op(6, dpUV))
with(Student[Calculus1]):
mean_dp := Mean(dpUV) assuming U < V:
mean_dp := eval(%, int=Int):
mean_dp := add(rhs~(map(Rule[`c*`], [op(mean_dp)])));
mean_dp := (-c+s)*(Int(f__D(_t)*_t, _t = -infinity .. U))+(p-c)*(Int(f__D(_t), _t = U .. V))+(m*p-m*s-c+s)*(Int(f__D(_t), _t = V .. infinity))
# let make "q" to appear (if you want it)
Krule := op(1, denom(lhs(UV[2]))) = K;
UVrule := eval((rhs=lhs)~(UV), Krule);
mean_dp_with_q := eval(mean_dp, UVrule);
# It is obvious that q__ER defined by solve(mean_dp_with_q=0, q) cannot be computed
# for f__D has no algebraic expression.
#
# So let's assume q__ER is known from any other mean
# Proceed as previously to compute Mean_p = Mean(Pi__ER):
pUV := eval(Pi__ER(beta__R), UV):
pUV := piecewise(_R <= U, op(2, pUV), _R < V, op(4, pUV), op(6, pUV)):
mean_p := Mean(pUV) assuming U < V:
mean_p := eval(%, int=Int):
mean_p := add(rhs~(map(Rule[`c*`], [op(mean_p)])));
mean_p__ER := eval(mean_p, q=q__ER);

ABCDE.mw

I've just added a few "partially instanciated" examples at the end of the attached file to (try to) convince you that there is no hope in finding a formal expression of** q__ER** and** Pi__ER** until **f__D** and **g__beta** are abstrat