Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sum(binomial(n,m)*x**m, (m, 0, n)) is given an irrelevant convergence condition and there is a strange factorization when y's are present #14142

Open
ghost opened this issue Feb 10, 2018 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented Feb 10, 2018

>>> pprint(Sum(binomial(n,m)*x**m, (m, 0, n)).doit())
⎧         n               
⎪  (x + 1)     for │x│ ≤ 1
⎪                         
⎪  n                      
⎪ ____                    
⎪ ╲                       
⎨  ╲    m ⎛n⎞             
⎪   ╲  x ⋅⎜ ⎟             
⎪   ╱     ⎝m⎠   otherwise 
⎪  ╱                      
⎪ ╱                       
⎪ ‾‾‾‾                    
⎩m = 0
>>> pprint(Sum(binomial(n,m)*x**m*y**(n-m), (m, 0, n)).doit())
⎧              n                 
⎪     n ⎛x    ⎞           │x│    
⎪    y ⋅⎜─ + 1⎟       for │─│ ≤ 1
⎪       ⎝y    ⎠           │y│    
⎪                                
⎪  n                             
⎪ ____                           
⎨ ╲                              
⎪  ╲    m  -m  n ⎛n⎞             
⎪   ╲  x ⋅y  ⋅y ⋅⎜ ⎟             
⎪   ╱            ⎝m⎠   otherwise 
⎪  ╱                             
⎪ ╱                              
⎪ ‾‾‾‾                           
⎩m = 0

Closing this issue would close #5446

@ghost ghost changed the title Sum(binomial(n,m)*x**m, (m, 0, n)) is given an erroneous convergence condition and there is a strange factorization when y's are present Sum(binomial(n,m)*x**m, (m, 0, n)) is given an irrelevant convergence condition and there is a strange factorization when y's are present Feb 10, 2018
@ghost
Copy link
Author

ghost commented Feb 10, 2018

Could this be solved by calling gosper instead of whatever method is used at present

@asmeurer
Copy link
Member

The method that gives a Piecewise with "irrelevant" convergence is the Meijer G algorithm (the same algorithm used for integrals). The convergence conditions aren't tight in general, though in practice they often are. Is it possible to clear the convergence question using the is_convergent algorithms?

What do you mean by "strange factorization"?

@ghost
Copy link
Author

ghost commented Feb 10, 2018

m and n are non-negative integers, should I have made that more explicit
They were declared to be such when I ran the computation

It's a finite sum, if a convergence condition is returned then something has gone wrong

The second sum is (x + y)**n, but it is expressed in the form (1 + t)**n

If Meijer G is causing problems then should the code be changed so that gosper is tried first

@PhoenixAlx
Copy link

That expression should return (x+y)^n , isn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants