Question: What´s the problem?

I tried the following:

restart;
with(Statistics):
X1 := RandomVariable(Binomial(n, p)):
DARA := t->piecewise(0<t,log(t),0):

0 < n, n::posint, 0 <= p, p <= 1:
 

ExpectedValue(DARA(X1));                                        
g1 := simplify(%) = DARA(s);
k1 := solve(g1, s);
 

but allways receive the error message: 'too many levels of recursion'.

What´s the problem?

 

Please Wait...