#9835: Make desolve more informative when solving BVP
----------------------------+-----------------------------------------------
Reporter: robert.marik | Owner: mhampton
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.6.1
Component: calculus | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Comment(by robert.marik):
Thanks for menitioning this.
Wihtout this patch we get
{{{
----------------------------------------------------------------------
| Sage Version 4.5.3, Release Date: 2010-09-04 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
The Sage install tree may have moved.
Regenerating Python.pyo and .pyc files that hardcode the install PATH
(please wait at most a few minutes)...
Do not interrupt this.
sage: vars = var('x'); y = function('y',x);
sage: soln = desolve(diff(y,x,2) +
100*y*(1-y^2),dvar=y,ivar=x,ics=[0,-1,1,1])
---------------------------------------------------------------------------
UnboundLocalError 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.py in desolve(de, dvar, ics, ivar,
show_method, contrib_ode)
358 if (ics is not None):
359 if not is_SymbolicEquation(soln.sage()):
--> 360 raise NotImplementedError, "Maxima was unable to use
initial condition for this equation (%s)"%(maxima_method.str())
361 if len(ics) == 2:
362 tempic=(ivar==ics[0])._maxima_().str()
UnboundLocalError: local variable 'maxima_method' referenced before
assignment
}}}
and the user does not know, what went wrong. With this patch the user
knows, that it Sage is not capable to use initial conditions for this ODE.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9835#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.