[sage-support] Re: Error in solving system of non-linear equations
Jason Grout wrote: > R (Chandra) Chandrasekhar wrote: >> Would you recommend that I compile from the source tarball instead? > > > Personally, that's what I recommend. Sage development moves at a nice > pace, and you're already missing out on a lot of very nice features and > a lot of bugfixes because the debian package hasn't kept up. The Sage > that you download is self-contained in one directory, which you can > delete or move around, so it is trivial to have multiple versions of > Sage installed in parallel in your home directory, for example. Thank you. I have downloaded, compiled and installed sage-3.4 from the source tarball on my Kubuntu Intrepid PC. It has been packaged really well because there were no hiccups. I only did two things after that. 1. On the first invocation of sage after installation, with sudo sage I ran install_scripts('/usr/local/bin') at the sage: prompt. 2. I also symlinked the sage script so: sudo ln -sf /path-to-untarred-sage/sage-3.4/sage /usr/local/bin/sage After that, things have been running smoothly and the problem with solving non-linear equations that originally prompted this thread has gone. >>> Does running "sage -maxima" >>> run maxima? Can you solve simpler equations? This time, on running sage -maxima I get: --- Maxima 5.16.3 http://maxima.sourceforge.net Using Lisp CLISP 2.46 (2008-07-02) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. The function bug_report() provides bug reporting information. --- For the benefit of the debian-sage team, the result for the Debian package was --- > Maxima 5.13.0 http://maxima.sourceforge.net > Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL) > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > This is a development version of Maxima. The function bug_report() > provides bug reporting information. --- Perhaps the differences between these two versions, including the type of Lisp, (plus other possible differences) contributed to the error I originally saw with the Debian package. Cheers! Chandra --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Error in solving system of non-linear equations
R (Chandra) Chandrasekhar wrote: > Jason Grout wrote: > >> I'm not sure what is going on here. Version 3.0.5 is from quite a while >> ago, at least in Sage terms. The calculation works great in the current >> version of Sage (version 3.4, just released yesterday, as tested on >> http://www.sagenb.org.) Did you say that this was from the jaunty >> source, as in the debian packaging of Sage? > > Yes. It is from the prospective Ubuntu 9.04 (April 2009) Jaunty release > built from Debian packages that might be customized for Ubuntu. > > Would you recommend that I compile from the source tarball instead? Personally, that's what I recommend. Sage development moves at a nice pace, and you're already missing out on a lot of very nice features and a lot of bugfixes because the debian package hasn't kept up. The Sage that you download is self-contained in one directory, which you can delete or move around, so it is trivial to have multiple versions of Sage installed in parallel in your home directory, for example. > >> Does running "sage -maxima" >> run maxima? Can you solve simpler equations? > > I am unfamiliar with maxima and its syntax, but typing > > sage -maxima > > gives > --- > Maxima 5.13.0 http://maxima.sourceforge.net > Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL) > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > This is a development version of Maxima. The function bug_report() > provides bug reporting information. > (%i1) > --- > > I was able to solve the preceding equations on that tutorial page > without error. I think I saw a maxima crash and then a message saying > "automatically restarted" but have not been able to replicate it. In any > case I remember I got the correct answer without any manual intervention. > > I am copying this reply to the debian-sage mailing list as well if it > might help in the solution. > If maxima crashed beforehand, that could be the problem. You could try starting up a fresh copy of Sage and just do the solving in question to test it. Thanks, Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Error in solving system of non-linear equations
Jason Grout wrote: > I'm not sure what is going on here. Version 3.0.5 is from quite a while > ago, at least in Sage terms. The calculation works great in the current > version of Sage (version 3.4, just released yesterday, as tested on > http://www.sagenb.org.) Did you say that this was from the jaunty > source, as in the debian packaging of Sage? Yes. It is from the prospective Ubuntu 9.04 (April 2009) Jaunty release built from Debian packages that might be customized for Ubuntu. Would you recommend that I compile from the source tarball instead? > Does running "sage -maxima" > run maxima? Can you solve simpler equations? I am unfamiliar with maxima and its syntax, but typing sage -maxima gives --- Maxima 5.13.0 http://maxima.sourceforge.net Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL) Distributed under the GNU Public License. See the file COPYING. Dedicated to the memory of William Schelter. This is a development version of Maxima. The function bug_report() provides bug reporting information. (%i1) --- I was able to solve the preceding equations on that tutorial page without error. I think I saw a maxima crash and then a message saying "automatically restarted" but have not been able to replicate it. In any case I remember I got the correct answer without any manual intervention. I am copying this reply to the debian-sage mailing list as well if it might help in the solution. Thank you. Chandra --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---
[sage-support] Re: Error in solving system of non-linear equations
R (Chandra) Chandrasekhar wrote: > Dear Folks, > > Pardon for the double-posting since I am unsure which list is more > appropriate. > > In section 2.4.1 of the Sage Tutorial, there is a non-linear equation > example from Jason Grout that I tried out, but it failed. Details follow. > > My version is built from the Ubuntu jaunty package source and runs on a > Kubuntu Intrepid AMD 64 PC. The startup banner is > > -- > > | SAGE Version 3.0.5, Release Date: 2008-07-11 | > > | Type notebook() for the GUI, and license() for information.| > > -- > > When I load the file with these contents for the example: > === > var('x y p q') > (x, y, p, q) > eq1 = p+q==9 > eq2 = q*y+p*x==-6 > eq3 = q*y^2+p*x^2==24 > solve([eq1,eq2,eq3,p==1],p,q,x,y) > === > > I get this error (with directory paths anonymized): > --- > > ValueErrorTraceback (most recent call > last) > > /Path-To-File_non_linear_eq_sage_0.py in () > >8 eq2 = q*y+p*x==-Integer(6) > >9 eq3 = q*y**Integer(2)+p*x**Integer(2)==Integer(24) > > ---> 10 solve([eq1,eq2,eq3,p==Integer(1)],p,q,x,y) 11 > 12 > > /usr/lib/python2.5/site-packages/sage/calculus/equations.pyc in solve(f, > *args, **kwds) > 1386 s = m.solve(args) > 1387 except: > -> 1388 raise ValueError, "Unable to solve %s for %s"%(f, args) > 1389 a = repr(s) > 1390 sol_list = string_to_list_of_solutions(a) > > ValueError: Unable to solve [q + p == 9, q*y + p*x == -6, q*y^2 + p*x^2 > == 24, p == 1] for (p, q, x, y) > WARNING: Failure executing file: > --- > > The version of the tutorial that I am using came with the version of > Sage installed. So, I do not think it is a version incmpatibility problem. > > Can someone tell me what the workaround is, or whether I need to file a > bug report. I'm not sure what is going on here. Version 3.0.5 is from quite a while ago, at least in Sage terms. The calculation works great in the current version of Sage (version 3.4, just released yesterday, as tested on http://www.sagenb.org.) Did you say that this was from the jaunty source, as in the debian packaging of Sage? Does running "sage -maxima" run maxima? Can you solve simpler equations? That said, when I read the tutorial, I thought it was kind of awkward to have my name be the only name on that page; surely other people contributed the many, many examples on that page. If there should be a reference, then maybe a reference to the paper the calculation came from would be in order (http://arxiv.org/abs/0710.5669), but I wouldn't think that would even be necessary unless you were also trying to make the point that Sage is used in published research, even with simple algebra. Thanks, Jason --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~--~~~~--~~--~--~---