[sage-support] Re: Is it possible to disable maxima automated simplification ?

2009-06-25 Thread Nicolas

Thanks for your detailed answer !
This clarifies lots of things for me !

On 24 juin, 19:05, William Stein wst...@gmail.com wrote:
 On Wed, Jun 24, 2009 at 6:47 PM, Nicolasnicolas.fresseng...@gmail.com wrote:

  Sorry, I thought this was clear.

  when you type
  sage: a=x+x+1
  sage: a
  2*x + 1

  If I understood correctly, the simplification of x+x by 2*x is done by
  maxima in the background.

 Just to be clear, that is definitely *NOT* the case.   It used to be
 the case before sage-4.0, but is not the case now.   Here's how you
 can check this:

 teragon:~ wstein$ sage
 --
 | Sage Version 4.0.2, Release Date: 2009-06-18                       |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: x + x + 1
 2*x + 1
 sage:
 Exiting SAGE (CPU time 0m0.08s, Wall time 0m23.29s).
 You have new mail in /var/mail/wstein
 teragon:~ wstein$ sage
 --
 | Sage Version 4.0.2, Release Date: 2009-06-18                       |
 | Type notebook() for the GUI, and license() for information.        |
 --
 sage: f = integrate(sin(x^2))
 sage:
 Exiting SAGE (CPU time 0m0.16s, Wall time 0m6.97s).
 Exiting spawned Maxima process.
 teragon:~ wstein$

 Notice that the first time there's no Exiting spawned Maxima process. 
 message.

  I f x is here much more complicated (or if the expression itself is
  complicated), the simplification process can become lengthy and even
  crash maxima. So my question was : is this possible that when I ask a
  in the second line above, that the answer would be x+x+1

 Note that maxima isn't involved.



  Sorry for the trouble

  Nicolas

  On 23 juin, 11:19, William Stein wst...@gmail.com wrote:
  On Tue, Jun 23, 2009 at 9:40 AM, Nicolasnicolas.fresseng...@gmail.com 
  wrote:

   I am in the writing of a program that deals with rather lengthy
   symbolic expressions involving unknown functions and differentiation.
   When running commands like derivatives, it seems that maxima
   automatically runs into place to simplify the obtained expressions.
   (This is consistent with the documentation)

   In  interactive sessions, this is perfectly good, but for my
   application, it has two major problems :
   - things are slowed down a lot because maxima tries to simplify long
   expressions which cannot be much simplified
   - worse : maxima often crashes which renders the whole program
   difficult to use

   My solution would be to disable maxima automated simplification but I
   cannot figure out if this is possible in sage or how to do it (I am
   using sage.4.0.1 on Fedora 10)

  Please provide a much more precise example than what you've given
  above (which is no examples at all).

   -- William

 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
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: Is it possible to disable maxima automated simplification ?

2009-06-24 Thread Nicolas

Sorry, I thought this was clear.

when you type
sage: a=x+x+1
sage: a
2*x + 1

If I understood correctly, the simplification of x+x by 2*x is done by
maxima in the background.
I f x is here much more complicated (or if the expression itself is
complicated), the simplification process can become lengthy and even
crash maxima. So my question was : is this possible that when I ask a
in the second line above, that the answer would be x+x+1

Sorry for the trouble

Nicolas


On 23 juin, 11:19, William Stein wst...@gmail.com wrote:
 On Tue, Jun 23, 2009 at 9:40 AM, Nicolasnicolas.fresseng...@gmail.com wrote:

  I am in the writing of a program that deals with rather lengthy
  symbolic expressions involving unknown functions and differentiation.
  When running commands like derivatives, it seems that maxima
  automatically runs into place to simplify the obtained expressions.
  (This is consistent with the documentation)

  In  interactive sessions, this is perfectly good, but for my
  application, it has two major problems :
  - things are slowed down a lot because maxima tries to simplify long
  expressions which cannot be much simplified
  - worse : maxima often crashes which renders the whole program
  difficult to use

  My solution would be to disable maxima automated simplification but I
  cannot figure out if this is possible in sage or how to do it (I am
  using sage.4.0.1 on Fedora 10)

 Please provide a much more precise example than what you've given
 above (which is no examples at all).

  -- William
--~--~-~--~~~---~--~~
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: Is it possible to disable maxima automated simplification ?

2009-06-24 Thread William Stein

On Wed, Jun 24, 2009 at 6:47 PM, Nicolasnicolas.fresseng...@gmail.com wrote:

 Sorry, I thought this was clear.

 when you type
 sage: a=x+x+1
 sage: a
 2*x + 1

 If I understood correctly, the simplification of x+x by 2*x is done by
 maxima in the background.

Just to be clear, that is definitely *NOT* the case.   It used to be
the case before sage-4.0, but is not the case now.   Here's how you
can check this:

teragon:~ wstein$ sage
--
| Sage Version 4.0.2, Release Date: 2009-06-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: x + x + 1
2*x + 1
sage:
Exiting SAGE (CPU time 0m0.08s, Wall time 0m23.29s).
You have new mail in /var/mail/wstein
teragon:~ wstein$ sage
--
| Sage Version 4.0.2, Release Date: 2009-06-18   |
| Type notebook() for the GUI, and license() for information.|
--
sage: f = integrate(sin(x^2))
sage:
Exiting SAGE (CPU time 0m0.16s, Wall time 0m6.97s).
Exiting spawned Maxima process.
teragon:~ wstein$


Notice that the first time there's no Exiting spawned Maxima process. message.

 I f x is here much more complicated (or if the expression itself is
 complicated), the simplification process can become lengthy and even
 crash maxima. So my question was : is this possible that when I ask a
 in the second line above, that the answer would be x+x+1

Note that maxima isn't involved.

 Sorry for the trouble

 Nicolas


 On 23 juin, 11:19, William Stein wst...@gmail.com wrote:
 On Tue, Jun 23, 2009 at 9:40 AM, Nicolasnicolas.fresseng...@gmail.com 
 wrote:

  I am in the writing of a program that deals with rather lengthy
  symbolic expressions involving unknown functions and differentiation.
  When running commands like derivatives, it seems that maxima
  automatically runs into place to simplify the obtained expressions.
  (This is consistent with the documentation)

  In  interactive sessions, this is perfectly good, but for my
  application, it has two major problems :
  - things are slowed down a lot because maxima tries to simplify long
  expressions which cannot be much simplified
  - worse : maxima often crashes which renders the whole program
  difficult to use

  My solution would be to disable maxima automated simplification but I
  cannot figure out if this is possible in sage or how to do it (I am
  using sage.4.0.1 on Fedora 10)

 Please provide a much more precise example than what you've given
 above (which is no examples at all).

  -- William
 




-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
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: Is it possible to disable maxima automated simplification ?

2009-06-24 Thread Robert Bradshaw

On Jun 24, 2009, at 10:05 AM, William Stein wrote:


 On Wed, Jun 24, 2009 at 6:47 PM,  
 Nicolasnicolas.fresseng...@gmail.com wrote:

 Sorry, I thought this was clear.

 when you type
 sage: a=x+x+1
 sage: a
 2*x + 1

 If I understood correctly, the simplification of x+x by 2*x is  
 done by
 maxima in the background.

 Just to be clear, that is definitely *NOT* the case.   It used to be
 the case before sage-4.0, but is not the case now.   Here's how you
 can check this:

 teragon:~ wstein$ sage
 --
 | Sage Version 4.0.2, Release Date: 2009-06-18   |
 | Type notebook() for the GUI, and license() for information.|
 --
 sage: x + x + 1
 2*x + 1
 sage:
 Exiting SAGE (CPU time 0m0.08s, Wall time 0m23.29s).


Pynac does perform some simplifications automatically, e.g. the x+x - 
  2*x. You can read about it here http://www.ginac.de/tutorial/ 
Automatic-evaluation.html . These are nearly impossible to avoid (I  
tried to do so for a while when working on powering) but shouldn't  
ever do anything expensive.

As for simplifying an integral, I'm not sure if it's simplified  
internally by maxima as part of the integration process, or when the  
result is printed. Have you tried assigning the result to a  
variable?  That would determine if we can do something about it.

- Robert
  

--~--~-~--~~~---~--~~
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: Is it possible to disable maxima automated simplification ?

2009-06-23 Thread William Stein

On Tue, Jun 23, 2009 at 9:40 AM, Nicolasnicolas.fresseng...@gmail.com wrote:

 I am in the writing of a program that deals with rather lengthy
 symbolic expressions involving unknown functions and differentiation.
 When running commands like derivatives, it seems that maxima
 automatically runs into place to simplify the obtained expressions.
 (This is consistent with the documentation)

 In  interactive sessions, this is perfectly good, but for my
 application, it has two major problems :
 - things are slowed down a lot because maxima tries to simplify long
 expressions which cannot be much simplified
 - worse : maxima often crashes which renders the whole program
 difficult to use

 My solution would be to disable maxima automated simplification but I
 cannot figure out if this is possible in sage or how to do it (I am
 using sage.4.0.1 on Fedora 10)

Please provide a much more precise example than what you've given
above (which is no examples at all).

 -- William

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---