[sage-support] Re: Computing a sum
On Thu, Nov 13, 2008 at 4:06 PM, Burcin Erocal <[EMAIL PROTECTED]> wrote: > > On Thu, 13 Nov 2008 12:32:54 +0100 > "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > >> >> On Thu, Nov 13, 2008 at 10:31 AM, Burcin Erocal <[EMAIL PROTECTED]> >> wrote: >> > > >> > We will have a completely new implementation of summation, >> > independent of the one in Maxima. At the moment I have an >> > implementation of the theoretical framework which lets you solve >> > much more complicated sums than the ones above. Unfortunately, >> > coming up with an interface that spares the user from the gory >> > details of the theory will still be a challenge. Thus, it will be >> > some time before these problems are handled natively in Sage, but >> > then Sage will (hopefully) be more capable than the others out >> > there. >> >> Is it still a plan to make the symbolic package standalone, or will >> this by tied and work only with the whole Sage? > > In this case, my code depends very much on Sage, but it is very likely > that it will only be used to handle certain types of expressions, > where simpler and faster algorithms are used to simplify most input. > You might be able to separate those to be in a package that can work > without Sage, though I don't worry about this when I am coding. Right. > > For pynac, the situation is completely different. While it is also > dependent on Sage at the moment, if you choose to use it for sympy, I > can make the interface between Sage and pynac clearer, and transfer > some of the glue code from Sage to pynac so that it's usable from > pure python. It might be better to wait a bit for pynac to mature > before doing this though. Excellent, thanks. Yes, let's wait a bit when it matures and see if people are interested in also having it as a separate package. Ondrej --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
Burcin Erocal wrote: > On Thu, 13 Nov 2008 04:09:56 -0600 > Jason Grout <[EMAIL PROTECTED]> wrote: > >> Burcin Erocal wrote: >> >>> >>> Returning to the question of how Sage plans to handle this, the >>> short answer is "I am working on it." :) >>> >> Yeah! >> >> >>> We will have a completely new implementation of summation, >>> independent of the one in Maxima. At the moment I have an >>> implementation of the theoretical framework which lets you solve >>> much more complicated sums than the ones above. Unfortunately, >>> coming up with an interface that spares the user from the gory >>> details of the theory will still be a challenge. Thus, it will be >>> some time before these problems are handled natively in Sage, but >>> then Sage will (hopefully) be more capable than the others out >>> there. >> >> Is there any chance you could make this work available so people >> could experiment with it, test it, and if desired, give suggestions >> for an interface? On the other hand, I understand if the work is >> still at a "I need to work on this alone" stage. > > In this case, there is a huge gap between theory and the user. It > is not like giving the ratio of the consecutive terms of your > summand as an argument to Gosper's algorithm. Unless you want to get > into research in this area, the code is useless for now. > > Nevertheless, I will start implementing a simple user interface, > which I hope will help me handle more complex expressions as > well. After I have the basic framework to construct the algebraic > objects I work with, given the symbolic expressions, I will start > submitting patches. > I would love to see this done in Sage. The few times that I fire up Maple is using the SumTools Package: > Introduction to the SumTools Package > > Calling Sequence > > SumTools[function](args) > > function(args) > > Description > > The SumTools package contains functions that help find closed forms of > definite and indefinite sums. The package consists of three functions > and three subpackages. > > Functions for Computing Closed Forms of Definite and Indefinite Sums > > SumTools[Summation]: compute closed forms of definite and indefinite sums > > SumTools[DefiniteSummation]: compute closed forms of definite sums > > SumTools[IndefiniteSummation]: compute closed forms of indefinite sums > > Tools for Computing Closed Forms of Indefinite sums: The IndefiniteSum > Subpackage > > SumTools[IndefiniteSum][AccurateSummation]: compute indefinite sums > using the method of accurate summation > > SumTools[IndefiniteSum][AddIndefiniteSum]: library extension mechanism > > SumTools[IndefiniteSum][Hypergeometric]: compute indefinite sums of > hypergeometric terms > > SumTools[IndefiniteSum][Indefinite]: compute closed forms of indefinite sums > > SumTools[IndefiniteSum][Polynomial]: compute indefinite sums of polynomials > > SumTools[IndefiniteSum][Rational]: compute indefinite sums of rational > functions > > SumTools[IndefiniteSum][RemoveIndefiniteSum]: library extension mechanism > > Tools for Computing Closed Forms of Definite Sums: The DefiniteSum Subpackage > > SumTools[DefiniteSum][CreativeTelescoping]: compute closed forms of > definite sums using the creative telescoping method > > SumTools[DefiniteSum][Definite]: compute closed forms of definite sums > > SumTools[DefiniteSum][pFqToStandardFunctions]: compute closed forms of > definite sums using the conversion method where the hypergeometric > series is used as an intermediate representation > > SumTools[DefiniteSum][Telescoping]: compute closed forms of definite > sums using the classical telescoping method > > Tools for Working with Hypergeometric Terms: The Hypergeometric Subpackage > > Normal forms of rational functions and hypergeometric terms: > > SumTools[Hypergeometric][MultiplicativeDecomposition], > SumTools[Hypergeometric][PolynomialNormalForm], > SumTools[Hypergeometric][RationalCanonicalForm], > SumTools[Hypergeometric][SumDecomposition] > > Algorithms for definite and indefinite sums of hypergeometric type: > > SumTools[Hypergeometric][ExtendedGosper], > SumTools[Hypergeometric][ExtendedZeilberger], > SumTools[Hypergeometric][Gosper], > SumTools[Hypergeometric][IsZApplicable], > SumTools[Hypergeometric][KoepfGosper], > SumTools[Hypergeometric][KoepfZeilberger], > SumTools[Hypergeometric][LowerBound], > SumTools[Hypergeometric][MinimalZpair], > SumTools[Hypergeometric][Zeilberger], > SumTools[Hypergeometric][ZeilbergerRecurrence], > SumTools[Hypergeometric][ZpairDirect] > > Applications: > > SumTools[Hypergeometric][DefiniteSum], > SumTools[Hypergeometric][IndefiniteSum], > SumTools[Hypergeometric][WZMethod] > > Other functions: > > SumTools[Hypergeometric][AreSimilar], > SumTools[Hypergeometric][ConjugateRTerm], > SumTools[Hypergeometric][IsHolonomic], > SumTools[Hypergeometric][IsHypergeometricTerm], > SumTools[Hypergeometric][IsProperHypergeometricTerm], > SumTools[Hypergeometric][Verify] > >
[sage-support] Re: Computing a sum
On Thu, 13 Nov 2008 12:32:54 +0100 "Ondrej Certik" <[EMAIL PROTECTED]> wrote: > > On Thu, Nov 13, 2008 at 10:31 AM, Burcin Erocal <[EMAIL PROTECTED]> > wrote: > > > > We will have a completely new implementation of summation, > > independent of the one in Maxima. At the moment I have an > > implementation of the theoretical framework which lets you solve > > much more complicated sums than the ones above. Unfortunately, > > coming up with an interface that spares the user from the gory > > details of the theory will still be a challenge. Thus, it will be > > some time before these problems are handled natively in Sage, but > > then Sage will (hopefully) be more capable than the others out > > there. > > Is it still a plan to make the symbolic package standalone, or will > this by tied and work only with the whole Sage? In this case, my code depends very much on Sage, but it is very likely that it will only be used to handle certain types of expressions, where simpler and faster algorithms are used to simplify most input. You might be able to separate those to be in a package that can work without Sage, though I don't worry about this when I am coding. For pynac, the situation is completely different. While it is also dependent on Sage at the moment, if you choose to use it for sympy, I can make the interface between Sage and pynac clearer, and transfer some of the glue code from Sage to pynac so that it's usable from pure python. It might be better to wait a bit for pynac to mature before doing this though. Cheers, Burcin --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Thu, 13 Nov 2008 04:09:56 -0600 Jason Grout <[EMAIL PROTECTED]> wrote: > > Burcin Erocal wrote: > > > > > > > Returning to the question of how Sage plans to handle this, the > > short answer is "I am working on it." :) > > > > Yeah! > > > > We will have a completely new implementation of summation, > > independent of the one in Maxima. At the moment I have an > > implementation of the theoretical framework which lets you solve > > much more complicated sums than the ones above. Unfortunately, > > coming up with an interface that spares the user from the gory > > details of the theory will still be a challenge. Thus, it will be > > some time before these problems are handled natively in Sage, but > > then Sage will (hopefully) be more capable than the others out > > there. > > > Is there any chance you could make this work available so people > could experiment with it, test it, and if desired, give suggestions > for an interface? On the other hand, I understand if the work is > still at a "I need to work on this alone" stage. In this case, there is a huge gap between theory and the user. It is not like giving the ratio of the consecutive terms of your summand as an argument to Gosper's algorithm. Unless you want to get into research in this area, the code is useless for now. Nevertheless, I will start implementing a simple user interface, which I hope will help me handle more complex expressions as well. After I have the basic framework to construct the algebraic objects I work with, given the symbolic expressions, I will start submitting patches. Cheers, Burcin --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Thu, Nov 13, 2008 at 10:31 AM, Burcin Erocal <[EMAIL PROTECTED]> wrote: > > On Mon, 10 Nov 2008 17:36:46 -0800 (PST) > cesarnda <[EMAIL PROTECTED]> wrote: > >> >> Actually this sum can't be done by Maxima, but Derive can do it (even >> an old version of derive). do you have an idea of how this problem is >> planning to be solved? > > As Robert Dodier pointed out, Maxima can actually do the sum, it is > just a bug in the maxima interface which fails to call the right > function. As he also mentioned, Maxima could probably solve this problem > before any others. > > Here is a paragraph from A = B [1], p. 74: > > R. W. Gosper, Jr., discovered his algorithm in conjunction with his > work on the development of one of the first symbolic algebra > programs, Macsyma. Because of his algorithm, Macsyma had a > seemingly uncanny ability to find simple formulas for sums of the > type (5.1.1). > > [1] http://www.math.upenn.edu/~wilf/AeqB.html > > > Returning to the question of how Sage plans to handle this, the short > answer is "I am working on it." :) > > We will have a completely new implementation of summation, independent > of the one in Maxima. At the moment I have an implementation of the > theoretical framework which lets you solve much more complicated > sums than the ones above. Unfortunately, coming up with an interface > that spares the user from the gory details of the theory will still be a > challenge. Thus, it will be some time before these problems are > handled natively in Sage, but then Sage will (hopefully) be more capable > than the others out there. Is it still a plan to make the symbolic package standalone, or will this by tied and work only with the whole Sage? Ondrej --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
Burcin Erocal wrote: > > > Returning to the question of how Sage plans to handle this, the short > answer is "I am working on it." :) > Yeah! > We will have a completely new implementation of summation, independent > of the one in Maxima. At the moment I have an implementation of the > theoretical framework which lets you solve much more complicated > sums than the ones above. Unfortunately, coming up with an interface > that spares the user from the gory details of the theory will still be a > challenge. Thus, it will be some time before these problems are > handled natively in Sage, but then Sage will (hopefully) be more capable > than the others out there. Is there any chance you could make this work available so people could experiment with it, test it, and if desired, give suggestions for an interface? On the other hand, I understand if the work is still at a "I need to work on this alone" stage. Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Mon, 10 Nov 2008 17:36:46 -0800 (PST) cesarnda <[EMAIL PROTECTED]> wrote: > > Actually this sum can't be done by Maxima, but Derive can do it (even > an old version of derive). do you have an idea of how this problem is > planning to be solved? As Robert Dodier pointed out, Maxima can actually do the sum, it is just a bug in the maxima interface which fails to call the right function. As he also mentioned, Maxima could probably solve this problem before any others. Here is a paragraph from A = B [1], p. 74: R. W. Gosper, Jr., discovered his algorithm in conjunction with his work on the development of one of the first symbolic algebra programs, Macsyma. Because of his algorithm, Macsyma had a seemingly uncanny ability to find simple formulas for sums of the type (5.1.1). [1] http://www.math.upenn.edu/~wilf/AeqB.html Returning to the question of how Sage plans to handle this, the short answer is "I am working on it." :) We will have a completely new implementation of summation, independent of the one in Maxima. At the moment I have an implementation of the theoretical framework which lets you solve much more complicated sums than the ones above. Unfortunately, coming up with an interface that spares the user from the gory details of the theory will still be a challenge. Thus, it will be some time before these problems are handled natively in Sage, but then Sage will (hopefully) be more capable than the others out there. Cheers, Burcin --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Nov 10, 7:15 pm, cesarnda <[EMAIL PROTECTED]> wrote: > that is the output I was expecting, but it is not the input I gave. > Obviously, > 1/x - 1/(x+1) = 1/(x*(x+1)) > > but, if the right hand side can be done why the left hand side can't? > This is the bug I was talking about... Thanks for pointing it out. If you can file a bug report in the Maxima bug tracker (http://sourceforge.net/projects/maxima/bugs or something like that) or post a message to the mailing list, that would be helpful. It turns out that nusum (the Gosper algorithm written by Gosper himself iirc) can solve this problem, but I guess nusum is not consulted by simplify_sum before the latter gives up. I didn't look into it carefully. best Robert Dodier --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Tue, Nov 11, 2008 at 3:15 AM, cesarnda <[EMAIL PROTECTED]> wrote: > > that is the output I was expecting, but it is not the input I gave. > Obviously, > 1/x - 1/(x+1) = 1/(x*(x+1)) > > but, if the right hand side can be done why the left hand side can't? > This is the bug I was talking about... It probably depends on the algorithm, in sympy, it's currently the other way round: In [2]: sum(1/x - 1/(x+1), (x, 1, oo)) Out[2]: 1 In [3]: sum(1/(x*(x+1)), (x, 1, oo)) Out[3]: Sum(1/(x*(1 + x)), (x, 1, oo)) Ondrej --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
that is the output I was expecting, but it is not the input I gave. Obviously, 1/x - 1/(x+1) = 1/(x*(x+1)) but, if the right hand side can be done why the left hand side can't? This is the bug I was talking about... On 10 nov, 19:51, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > On Mon, Nov 10, 2008 at 5:36 PM, cesarnda <[EMAIL PROTECTED]> wrote: > > > Actually this sum can't be done by Maxima, but Derive can do it (even > > an old version of derive). do you have an idea of how this problem is > > planning to be solved? > > Is this the answer you were expecting? > > (%i6) load(simplify_sum); > (%o6) > > /opt/sage/local/share/maxima/5.16.3/share/contrib/solve_rec/simplify_sum.ma c > (%i7) simplify_sum(sum(1/(x*(x+1)),x,1,inf)); > (%o7) 1 > > --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Mon, Nov 10, 2008 at 5:36 PM, cesarnda <[EMAIL PROTECTED]> wrote: > > Actually this sum can't be done by Maxima, but Derive can do it (even > an old version of derive). do you have an idea of how this problem is > planning to be solved? Is this the answer you were expecting? (%i6) load(simplify_sum); (%o6) /opt/sage/local/share/maxima/5.16.3/share/contrib/solve_rec/simplify_sum.mac (%i7) simplify_sum(sum(1/(x*(x+1)),x,1,inf)); (%o7) 1 --Mike --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
Actually this sum can't be done by Maxima, but Derive can do it (even an old version of derive). do you have an idea of how this problem is planning to be solved? On 10 nov, 19:30, "William Stein" <[EMAIL PROTECTED]> wrote: > On Mon, Nov 10, 2008 at 5:29 PM, cesarnda <[EMAIL PROTECTED]> wrote: > > > how could I compute this: > > > sum_{ x = 1}^{\infty} 1/x - 1/(x+1) > > > or > > > sum(1/x-1/(x+1),x,1, infinity) > > > directly in Sage, without calling maxima or sympy? > > Unfortunately, this isn't implemented yet. See: > > http://trac.sagemath.org/sage_trac/ticket/3587 > > William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Computing a sum
On Mon, Nov 10, 2008 at 5:29 PM, cesarnda <[EMAIL PROTECTED]> wrote: > > how could I compute this: > > sum_{ x = 1}^{\infty} 1/x - 1/(x+1) > > or > > sum(1/x-1/(x+1),x,1, infinity) > > directly in Sage, without calling maxima or sympy? Unfortunately, this isn't implemented yet. See: http://trac.sagemath.org/sage_trac/ticket/3587 William --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---