On 21 zář, 12:08, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote: > Error in desolve - it starts different process for Maxima. solved > inhttp://trac.sagemath.org/sage_trac/ticket/9835(needs_review).
I tested examples which worked in Maxima but did not work in Sage. With this patch we have ma...@um-bc107:/opt/sage$ ./sage ---------------------------------------------------------------------- | Sage Version 4.5.3, Release Date: 2010-09-04 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: assume(x>0) sage: y=function('y',x) sage: assume(y>0) sage: desolve(x*diff(y,x)-x*sqrt(y^2+x^2)-y,y,contrib_ode=True) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /opt/sage-4.5.3-Debian_Lenny_64-x86_64-Linux/<ipython console> in <module>() /opt/sage-4.5.3-Debian_Lenny_64-x86_64-Linux/local/lib/python2.6/site- packages/sage/calculus/desolvers.pyc in desolve(de, dvar, ics, ivar, show_method, contrib_ode) 423 # we produce string like this 424 # (TEMP:contrib_ode(x*('diff(y,x,1))^2-(x*y +1)*'diff(y,x,1)+y,y,x), if TEMP=false then TEMP else substitute(y=y(x),TEMP)) --> 425 soln = P(cmd) 426 if str(soln).strip() == 'false': 427 raise NotImplementedError, "Maxima was unable to solve this ODE." /opt/sage-4.5.3-Debian_Lenny_64-x86_64-Linux/local/lib/python2.6/site- packages/sage/interfaces/expect.pyc in __call__(self, x, name) 1030 1031 if isinstance(x, basestring): -> 1032 return cls(self, x, name=name) 1033 try: 1034 return self._coerce_from_special_method(x) /opt/sage-4.5.3-Debian_Lenny_64-x86_64-Linux/local/lib/python2.6/site- packages/sage/interfaces/expect.pyc in __init__(self, parent, value, is_name, name) 1449 except (TypeError, KeyboardInterrupt, RuntimeError, ValueError), x: 1450 self._session_number = -1 -> 1451 raise TypeError, x 1452 self._session_number = parent._session_number 1453 TypeError: Computation failed since Maxima requested additional constraints (try the command 'assume(y>0)' before integral or limit evaluation, for example): Is y zero or nonzero? On the other hand, declaring y as variable first, assuming y>0 and declaring y as a function helps ma...@um-bc107:/opt/sage$ ./sage ---------------------------------------------------------------------- | Sage Version 4.5.3, Release Date: 2010-09-04 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: assume(x>0) sage: y=var('y') sage: assume(y>0) sage: y=function('y',x) sage: desolve(x*diff(y,x)-x*sqrt(y^2+x^2)-y,y,contrib_ode=True) [x - arcsinh(y(x)/x) == c] Any explanation for this? Is it a bug? In assume facility? Thanks Robert > > Robert > > On 21 zář, 03:26, Oscar Gerardo Lazo Arjona > > <algebraicame...@gmail.com> wrote: > > Hello! > > > I'm trying to solve this ODE: > > > var('t alpha beta n') > > x=function('x',t) > > eq=diff(x,t)^2==alpha-beta abs(x)^n > > assume(n,'integer') > > desolve(eq,x,ivar=t,contrib_ode=True) > > > but I get: > > > Traceback (click to the left of this block for traceback) > > ... > > Is n an integer? > > > but I've already told sage that n is an integer. > > > I'm using sage 4.5.2 > > > thank you > > > Oscar > > -- 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 URL: http://www.sagemath.org