#9710: Assumptions not passed to differential equation solver
------------------------+---------------------------------------------------
   Reporter:  kedlaya   |       Owner:  burcin                             
       Type:  defect    |      Status:  new                                
   Priority:  major     |   Milestone:                                     
  Component:  calculus  |    Keywords:  differential equations, assumptions
     Author:            |    Upstream:  N/A                                
   Reviewer:            |      Merged:                                     
Work_issues:            |  
------------------------+---------------------------------------------------
 The assume function doesn't seem to work with the differential equation
 solver, despite what the documentation for desolve suggests. This returns
 an error:
 {{{
 sage: x = var('x')
 sage: k = var('k')
 sage: y = function('y',x)
 sage: assume(k>0)
 sage: print desolve(diff(y,x,x)+k*y-exp(-k*x),[y,x])
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "_sage_input_25.py", line 10, in <module>
     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
 -*-\\n" +
 
_support_.preparse_worksheet_cell(base64.b64decode("eCA9IHZhcigneCcpCmsgPSB2YXIoJ2snKQp5ID0gZnVuY3Rpb24oJ3knLHgpCmFzc3VtZShrPjApCnByaW50IGRlc29sdmUoZGlmZih5LHgseCkrayp5LWV4cCgtayp4KSxbeSx4XSk="),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
   File "", line 1, in <module>

   File "/tmp/tmpyNFGr0/___code___.py", line 7, in <module>
     exec compile(u'print desolve(diff(y,x,x)+k*y-exp(-k*x),[y,x])
   File "", line 1, in <module>

   File "/home/kedlaya/sage-complete/local/lib/python2.6/site-
 packages/sage/calculus/desolvers.py", line 340, in desolve
     soln = maxima(cmd)
   File "/home/kedlaya/sage-complete/local/lib/python2.6/site-
 packages/sage/interfaces/expect.py", line 1032, in __call__
     return cls(self, x, name=name)
   File "/home/kedlaya/sage-complete/local/lib/python2.6/site-
 packages/sage/interfaces/expect.py", line 1451, in __init__
     raise TypeError, x
 TypeError: Computation failed since Maxima requested additional
 constraints (try the command 'assume(k>0)' before integral or limit
 evaluation, for example):
 Is  k  positive, negative, or zero?
 }}}
 Found by Praveen N. and Aashita during Sage Days 25 coding sprint.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9710>
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