[sage-support] Re: Simplifying expression, 'x' vs. 'y'
On Wednesday, 12 December 2012 02:28:19 UTC, kcrisman wrote: On Tuesday, December 11, 2012 6:52:53 PM UTC-5, JamesHDavenport wrote: Pedantic Note. Jacques Carette's paper: Understanding Expression Simplification. Proc. ISSAC 2004 (ed. J. Gutierrez), ACM Press, New York, 2004, pp. 72-79. http://www.cas.mcmaster.ca/~carette/publications/simplification.pdf. defines it in a useful way, just not in a computable way (that I can see in practice). Very interesting paper. I guess I was referring to the sense that (1+x)(1-x) and 1-x^2 might each be considered simpler depending on the context, which is the way a lot of people who don't know about decidability would perceive this question (or so my experience has been interacting with a lot of people who ask about why Sage doesn't simplify this or that). I suppose the answer to my example would depend on what you pick for your axiomoids? RJF always seems to have a useful comment about these things as well. Carette would argue that 1-x^2 requires fewer characters (or tree nodes, or whatever), so is definitely 'simpler'. I would add 'if the user wants 'factor', he/she should ask for it! -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Simplifying expression, 'x' vs. 'y'
might each be considered simpler depending on the context, which is the way a lot of people who don't know about decidability would perceive this question (or so my experience has been interacting with a lot of people who ask about why Sage doesn't simplify this or that). I suppose the answer to my example would depend on what you pick for your axiomoids? RJF always seems to have a useful comment about these things as well. Carette would argue that 1-x^2 requires fewer characters (or tree nodes, or whatever), so is definitely 'simpler'. I would add 'if the user wants 'factor', he/she should ask for it! Of course! I guess my point is that that's not always what people mean by simplify, but sometimes it is, because people (esp. if they're not computer scientists) don't have an expression tree in mind when they use that word colloquially :-) -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Simplifying expression, 'x' vs. 'y'
On Tuesday, December 11, 2012 3:15:31 AM UTC-5, jori.ma...@uta.fi wrote: # Define var('y'); var('x') f(x,y)= -(x*y)*exp(-(x^2 + y^2)) fdx(x,y) = derivative(f(x,y), x) fdy(x,y) = derivative(f(x,y), y) # Check print f(x,y)-f(y,x) # Compare these print derivative(f(x,y), x).simplify_full() print derivative(f(x,y), y).simplify_full() This will print 0 (2*x^2 - 1)*y*e^(-x^2 - y^2) (2*x*y^2 - x)*e^(-x^2 - y^2) Partly educated guess; the Pynac print order we use sage: fdx (x, y) |-- 2*x^2*y*e^(-x^2 - y^2) - y*e^(-x^2 - y^2) sage: fdy (x, y) |-- 2*x*y^2*e^(-x^2 - y^2) - x*e^(-x^2 - y^2) makes it easy for Maxima to guess that y*e^(-x^2-y^2) factors out of the first expression but not the second, since the x is hidden. But this is done in Maxima, in particular with fullratsimp sage: fdx.simplify_rational() (x, y) |-- (2*x^2 - 1)*y*e^(-x^2 - y^2) sage: fdy.simplify_rational() (x, y) |-- (2*x*y^2 - x)*e^(-x^2 - y^2) I wouldn't worry about it, since in general there is no way to define simpler expression that is fully useful at all times, and for more complicated expressions more detail work would be needed anyway. - kcrisman -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Simplifying expression, 'x' vs. 'y'
On Tuesday, 11 December 2012 13:15:09 UTC, kcrisman wrote: I wouldn't worry about it, since in general there is no way to define simpler expression that is fully useful at all times, and for more complicated expressions more detail work would be needed anyway. Pedantic Note. Jacques Carette's paper: Understanding Expression Simplification. Proc. ISSAC 2004 (ed. J. Gutierrez), ACM Press, New York, 2004, pp. 72-79. http://www.cas.mcmaster.ca/~carette/publications/simplification.pdf. defines it in a useful way, just not in a computable way (that I can see in practice). -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.
[sage-support] Re: Simplifying expression, 'x' vs. 'y'
On Tuesday, December 11, 2012 6:52:53 PM UTC-5, JamesHDavenport wrote: On Tuesday, 11 December 2012 13:15:09 UTC, kcrisman wrote: I wouldn't worry about it, since in general there is no way to define simpler expression that is fully useful at all times, and for more complicated expressions more detail work would be needed anyway. Pedantic Note. Jacques Carette's paper: Understanding Expression Simplification. Proc. ISSAC 2004 (ed. J. Gutierrez), ACM Press, New York, 2004, pp. 72-79. http://www.cas.mcmaster.ca/~carette/publications/simplification.pdf. defines it in a useful way, just not in a computable way (that I can see in practice). Very interesting paper. I guess I was referring to the sense that (1+x)(1-x) and 1-x^2 might each be considered simpler depending on the context, which is the way a lot of people who don't know about decidability would perceive this question (or so my experience has been interacting with a lot of people who ask about why Sage doesn't simplify this or that). I suppose the answer to my example would depend on what you pick for your axiomoids? RJF always seems to have a useful comment about these things as well. -- You received this message because you are subscribed to the Google Groups sage-support group. 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. Visit this group at http://groups.google.com/group/sage-support?hl=en.