#2617: solve() can return undefined points as "solutions"
------------------------+---------------------------------------------------
   Reporter:  cwitty    |       Owner:  was       
       Type:  defect    |      Status:  new       
   Priority:  critical  |   Milestone:  sage-4.3.1
  Component:  calculus  |    Keywords:            
Work_issues:            |      Author:            
   Upstream:  N/A       |    Reviewer:            
     Merged:            |  
------------------------+---------------------------------------------------

Comment(by kcrisman):

 As it turns out, to_poly_solve can handle this sort of thing (see in
 Maxima the share/contrib/rtest_to_poly_solver.mac line 1092).  But we
 would have to figure out a way to interpret the if statements properly
 (for instance, to note that twice an integer plus one is not zero).
 {{{
 /* Sage Ticket 2617; see also Sage mailing list 18 March 2008 */

 nicedummies(to_poly_solve(sin(x^2)/x,x));
 %union(%if(2*%z0+1 # 0,[x = -sqrt(2*%pi*%z0+%pi)],%union()),
              %if(2*%z0+1 # 0,[x = sqrt(2*%pi*%z0+%pi)],%union()),
              %if(%z1 # 0,[x = -sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()),
              %if(%z1 # 0,[x = sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()))$

 nicedummies(to_poly_solve(sin(x^2)/x^2,x));
 %union(%if(2*%z0+1 # 0,[x = -sqrt(2*%pi*%z0+%pi)],%union()),
              %if(2*%z0+1 # 0,[x = sqrt(2*%pi*%z0+%pi)],%union()),
              %if(%z1 # 0,[x = -sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()),
              %if(%z1 # 0,[x = sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()))$

 nicedummies(to_poly_solve(sin(x^2)/x^3,x));
 %union(%if(2*%z0+1 # 0,[x = -sqrt(2*%pi*%z0+%pi)],%union()),
              %if(2*%z0+1 # 0,[x = sqrt(2*%pi*%z0+%pi)],%union()),
              %if(%z1 # 0,[x = -sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()),
              %if(%z1 # 0,[x = sqrt(2)*sqrt(%pi)*sqrt(%z1)],%union()))$
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2617#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--

You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.


Reply via email to