problem about simplification over limit operation with binomial and exponential?

9 views
Skip to first unread message

mrgan...@gmail.com

unread,
Dec 14, 2014, 6:53:25 AM12/14/14
to sage-s...@googlegroups.com



considering the flowing code:

————————————————————————

from sage.symbolic.assumptions import GenericDeclaration;

var('lamda,n,k,p');

decl1 = GenericDeclaration(k, 'integer');

decl1.assume();

assume(k>0,k>1,n>k,lamda>0,lamda<n);

ep=binomial(n,k)*p^k*(1-p)^(n-k);

ep=ep.subs_expr(p==lamda/n);

ep=ep.subs_expr(binomial(n,k)==factorial(n)/factorial(k)/factorial(n-k));

ep=limit(ep,n=oo);

ep.simplify_full();

————————————————————————

the result is:

   lamda^k*limit((-(lamda - n)/n)^n*factorial(n)/((-lamda + n)^k*factorial(-k + n)), n, +Infinity)/factorial(k)

————————————————————————

it is not the simplest form.

In fact , sage will give me the simplest form as below when I paste the result above to sage again.

————————————————————————

lamda^k*e^(-lamda)/factorial(k)    

————————————————————————

the question is how can i get the simplest form directly?

Reply all
Reply to author
Forward
0 new messages