Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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)&lt;em">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^klimit((-(lamda - n)/n)^nfactorial(n)/((-lamda + n)^kfactorial(-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^ke^(-lamda)/factorial(k)     ———————————————————————— the question is how can i get the simplest form directly?

sage cannot get the simplest form on the limit expression with binomial and exponential operations

considering the flowing code: ———————————————————————— code:

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

from sage.symbolic.assumptions import GenericDeclaration; var('lamda,n,k,p'); 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)&lt;em">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(); ———————————————————————— 'integer');

decl1.assume();

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

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: is:

   lamda^klimit((-(lamda - n)/n)^nfactorial(n)/((-lamda + n)^kfactorial(-k n)^k*factorial(-k + n)), n, +Infinity)/factorial(k) ———————————————————————— +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^ke^(-lamda)/factorial(k) again.

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

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

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

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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);< p="">

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^klimit((-(lamda - n)/n)^nfactorial(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?

click to hide/show revision 4
No.4 Revision

sage cannot get the simplest form on the limit expression with binomial and exponential operations

considering the flowing code:

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

from sage.symbolic.assumptions import GenericDeclaration;

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

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

decl1 = GenericDeclaration(k, 'integer');

'integer'); decl1.assume();

decl1.assume();

assume(k>0,k>1,n>k,lamda>0,lamda<n); ep=binomial(n,k)*p^k*(1-p)^(n-k);

assume(k>0,k>1,n>k,lamda>0,lamda<n);< p=""> ep=ep.subs_expr(p==lamda/n);

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

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

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();

ep.simplify_full();

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

the result is:

   lamda^klimit((-(lamda - n)/n)^nfactorial(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)  

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

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

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

click to hide/show revision 5
No.5 Revision

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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^klimit((-(lamda lamda^k*limit((-(lamda - n)/n)^nfactorial(n)/((-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?

click to hide/show revision 6
No.6 Revision

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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)+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?

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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?

sage cannot get the simplest form on the limit expression with binomial and exponential operations

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?