[sage-support] Re: How group terms in an expression? maybe a bug ?

2009-10-12 Thread Francois Maltey
Thanks Mike, > You should check the version of Sage that you are using. The > SymbolicArithmetic class shouldn't exist after Sage 4.0. > I test again this morning, and it's right ! Indeed I have 3 sage(s) in my ubuntu box. The ubuntu one, an old version, the 4.1.2-a4 and my one with little p

[sage-support] Re: How group terms in an expression? maybe a bug ?

2009-10-12 Thread Mike Hansen
Hello, On Tue, Oct 13, 2009 at 2:18 AM, Francois Maltey wrote: > /home/fmy/.sage/temp/solen/9693/_home_fmy__sage_init_sage_0.py in () > > 1 >      2 >      3 >      4 >      5 > AttributeError: 'SymbolicArithmetic' object has no attribute 'collect' > > Is it a bug ? Where am I wrong ? > I us

[sage-support] Question about jmol in SAGE

2009-10-12 Thread QuantumDream
Is it possible to export the output of the jmol applet (not just a snapshot pic) to use it offline, say in the middle of a presentation, without having to start SAGE & FF and load the notebook? I know you can export the javascript code from jmol, but I have no clue how to proceed. I'm using SAGE

[sage-support] Re: How group terms in an expression? maybe a bug ?

2009-10-12 Thread ma...@mendelu.cz
no error with 4.1.2.rc0 R.M. [ma...@um-bc201 /opt/sage-4.1.2.rc0]$ ./sage -- | Sage Version 4.1.2.rc0, Release Date: 2009-09-30 | | Type notebook() for the GUI, and license() for information.| --

[sage-support] Re: Motion & planets

2009-10-12 Thread Jaap Spies
Rolandb wrote: > Hi, I'm interested in the motion of planets around the sun. Before I > 'reinvent the wheel', maybe someone has made a simple model and he/she > is willing to share it? Thanks in advance! Hi Roland, You asked explicitly for a simple model, so pynovas is not what you are looking f

[sage-support] Motion & planets

2009-10-12 Thread Rolandb
Hi, I'm interested in the motion of planets around the sun. Before I 'reinvent the wheel', maybe someone has made a simple model and he/she is willing to share it? Thanks in advance! Rolandb --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@goo

[sage-support] import

2009-10-12 Thread Mikie
My Python script is getting very large. The html pages I am creating are all class defs. Can I save the defs in a text file then import them? If so where do I put them. Isn't Sage just one large bounce of Python files? Please, excuse my lack of Python/Sage knowledge. Six months ago I couldn't

[sage-support] Re: How group terms in an expression? maybe a bug ?

2009-10-12 Thread Francois Maltey
Hello, About this question, I test coefficient and collect. Is it a bug ? or is there a reason ? collect and coefficient don't have the same react : I take a line equation test = cos(a)*x+sin(a)*y-h # means ... == 0 test.coefficient(cos(a)) # are right test.coefficient(x) test.collect(x) t

[sage-support] Re: How group terms in an expression? e.g. all terms containing x or y

2009-10-12 Thread ma...@mendelu.cz
(3*x + m*x + a*y+b*y ).collect(x).collect(y) On 12 říj, 19:20, Chris Seberino wrote: > How group terms in an expression? > > e.g. How group terms with x and y in: > >               3*x + m*x + a*y+b*y > > to get: > >               (3 + m)*x + (a + b)*y ?? > > cs --~--~-~--~~-

[sage-support] How group terms in an expression? e.g. all terms containing x or y

2009-10-12 Thread Chris Seberino
How group terms in an expression? e.g. How group terms with x and y in: 3*x + m*x + a*y+b*y to get: (3 + m)*x + (a + b)*y ?? cs --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe f

[sage-support] Re: performance issues with sparse rational matrices

2009-10-12 Thread DMonniaux
The thing is, I'm not interested in 55x55 matrices per se - my matrix dimensions grow quadratically with some parameter of my system, so I'm testing things on small sizes before embarking on real computations. --~--~-~--~~~---~--~~ To post to this group, send email

[sage-support] Re: performance issues with sparse rational matrices

2009-10-12 Thread Jason Grout
DMonniaux wrote: > I'm computing with sparse rational matrices of moderate size (about > 55x55). Curiously, a lot of time seems to be spent in functions > constructing matrices, for instance from list of sparse vectors. > > 1120.3850.0030.7720.007 constructor.py:33 > (matrix

[sage-support] performance issues with sparse rational matrices

2009-10-12 Thread DMonniaux
I'm computing with sparse rational matrices of moderate size (about 55x55). Curiously, a lot of time seems to be spent in functions constructing matrices, for instance from list of sparse vectors. 1120.3850.0030.7720.007 constructor.py:33 (matrix) 369/3210.0120.000

[sage-support] Re: Force quadrature rather than symbolic integration?

2009-10-12 Thread Jason Grout
Daniel Farrell wrote: > Hello, > > Is there a quadrature equivalent to integrate(f,a,b)? I have an > equation with no analytical integral so quadrature is the only > alternative, for example by, simps or trapz. > You can use numerical_integral or the scipy quad function: http://docs.scipy.org

[sage-support] Error: symbolic Ring still using old coercion framework

2009-10-12 Thread Sand Wraith
Hi all! I am trying to do simple convolution: x = PolynomialRing(QQ,'x').gen() f=piecewise([((-1,3),1*x^0)]) g=piecewise([((0,5),exp(-x))]) r=g.convolution(f) and got this error message: RuntimeError: Symbolic Ring still using old coercion framework What is wrong with it? --~--~-~--~-

[sage-support] Re: Force quadrature rather than symbolic integration?

2009-10-12 Thread ma...@mendelu.cz
numerical_integral? On 12 říj, 13:01, "ma...@mendelu.cz" wrote: > Perhaps somebody knows how is this supported in Sage. --~--~-~--~~~---~--~~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-su

[sage-support] Re: Force quadrature rather than symbolic integration?

2009-10-12 Thread ma...@mendelu.cz
Perhaps somebody knows how is this supported in Sage. I know only how to get the answer via maxima and http://maxima.sourceforge.net/docs/manual/en/maxima_20.html#Item_003a-Introduction-to-QUADPACK sage: expr=sin(x)/x sage: ex=expr._maxima_() sage: print ex.quad_qags(x,1,2,).sage() sage: ex.quad_

[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread Francois Maltey
Hello wxuyec, > The same expression, How can I want to get > > the coefficient of x^4*y? > The coefficient of the coefficient... try var('a b x y') res = expand ((a+b+x+y+1)^6) res.coefficient (x^4) res.coefficient (y) res.coefficient (x^4).coefficient(y) res.coefficient (y).coefficient(x^4)

[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread wxuyec
The same expression, How can I want to get the coefficient of x^4*y? Thank you! Mike Hansen 写道: > Hello, > > 2009/10/12 : > >> Hi, I have another question. >> >> I have got the expression, >> >> a^2*x^4+b*x^4+c*x+d*y*x^4...(many items) >> >> I want to get the coefficient of all the x,x^2

[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread Mike Hansen
On Mon, Oct 12, 2009 at 3:30 PM, wrote: > > Thank you. > > It confused me how can I know all about the method. > > Is there some efficient way to know all of them? The easiest way is to use tab-completion. For example, if ex is your object, type in "ex.simplify_" and then press TAB. It will s

[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread wxuyec
Thank you. It confused me how can I know all about the method. Is there some efficient way to know all of them? Laurent 写道: > wxu...@sohu.com ha scripte: > >> Hi, everyone, I got the expression, >> >> sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + >> 4*sin(t)^2*cos(t)^6 + cos(t)^8

[sage-support] Re: how to simply the equation

2009-10-12 Thread lutusp
On Oct 12, 1:11 am, wxu...@sohu.com wrote: > Hi, everyone, I got the expression, > > sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + > 4*sin(t)^2*cos(t)^6 + cos(t)^8 > actually it is 1. how can I get it? sage: (sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t) ^2*cos(t)^6 +

[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread wxuyec
Thank you very much. Mike Hansen 写道: > Hello, > > 2009/10/12 : > >> Hi, everyone, I got the expression, >> >> sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + >> 4*sin(t)^2*cos(t)^6 + cos(t)^8 >> actually it is 1. how can I get it? >> > > Here you go: > > sage: t = var('t') > sa

[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread Mike Hansen
Hello, 2009/10/12 : > > Hi, I have another question. > > I have got the expression, > > a^2*x^4+b*x^4+c*x+d*y*x^4...(many items) > > I want to get the coefficient of all the x,x^2,x^3,x^4 > > here for x^4 is (a^2+b+d*y...) > > how can I get it? Something like this: sage: var('a,b,c,d,x,y')

[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread Laurent
wxu...@sohu.com ha scripte: > Hi, everyone, I got the expression, > > sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + > 4*sin(t)^2*cos(t)^6 + cos(t)^8 > actually it is 1. how can I get it? > > Thanks in advance! > > The secret is the method fullsimplify var('t') A = sin(t)**8 + 4*sin(t

[sage-support] [sage-support]how to collect the same items

2009-10-12 Thread wxuyec
Hi, I have another question. I have got the expression, a^2*x^4+b*x^4+c*x+d*y*x^4...(many items) I want to get the coefficient of all the x,x^2,x^3,x^4 here for x^4 is (a^2+b+d*y...) how can I get it? Thanks in advance! YC Xu --~--~-~--~~~---~--~~ To p

[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread Mike Hansen
Hello, 2009/10/12 : > > Hi, everyone, I got the expression, > > sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + > 4*sin(t)^2*cos(t)^6 + cos(t)^8 > actually it is 1. how can I get it? Here you go: sage: t = var('t') sage: a = sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 + 4*sin(t