Opened 5 years ago
Last modified 7 weeks ago
#23445 needs_work defect
maxima parser not smart enough
Reported by: | vdelecroix | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.7 |
Component: | interfaces | Keywords: | symbolic |
Cc: | Merged in: | ||
Authors: | Frédéric Chapoton | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/chapoton/23445 (Commits, GitHub, GitLab) | Commit: | c34e15559179b5151af87b5db398c1ef9a1c0c4a |
Dependencies: | Stopgaps: |
Description (last modified by )
As found in this post on ask.sagemath.org the function desolve_system
can fail with weird error message
sage: t = var('t') sage: f = function('f')(t) sage: g = function('g')(t) sage: de1 = diff(f,t) == f*sin(t) sage: de2 = diff(g,t) == 0 sage: desolve_system([de1, de2], [f,g]) Traceback (most recent call last): <ipython-input-1-58fe9994eeb3> in <module>() 2 de1 = diff(f,t) == f*sin(t); 3 de2 = diff(g,t) == Integer(0); ----> 4 desolve_system([de1, de2], [f,g]) .../sage/calculus/desolvers.pyc in desolve_system(des, vars, ics, ivar) 838 for i, sol in enumerate(soln): 839 print(sol) --> 840 soln[i] = sol.sage() 841 if ics is not None: 842 ivar_ic = ics[0] ... ValueError: The name "+" is not a valid Python identifier.
The reason is that the .sage()
method is not able to convert the maxima's answer back into Sage
f(_SAGE_VAR_t) = ilt((%i laplace(f(_SAGE_VAR_t), _SAGE_VAR_t, g2579 + %i) - %i laplace(f(_SAGE_VAR_t), _SAGE_VAR_t, g2579 - %i) + 2 f(0))/(2 g2579), g2579, _SAGE_VAR_t)
Change History (13)
comment:1 Changed 5 years ago by
- Description modified (diff)
comment:2 Changed 4 years ago by
comment:3 Changed 21 months ago by
simpler way to trigger the same error:
sage: from sage.calculus.calculus import dummy_laplace sage: s,t = var('s,t') sage: f = function('f') sage: dummy_laplace(f(t),t,s+1)
comment:4 Changed 21 months ago by
- Branch set to u/chapoton/23445
- Commit set to fd3436bd3c3fc0b7d09a235c7ca90f15cedf45e0
- Status changed from new to needs_info
comment:5 Changed 4 months ago by
- Milestone changed from sage-8.1 to sage-9.6
- Status changed from needs_info to needs_review
comment:6 Changed 4 months ago by
What about a doctest?
comment:7 Changed 4 months ago by
- Commit changed from fd3436bd3c3fc0b7d09a235c7ca90f15cedf45e0 to c34e15559179b5151af87b5db398c1ef9a1c0c4a
comment:8 Changed 4 months ago by
voila
mais il reste un probleme de non-oubli (permanence) de la fonction g
comment:9 Changed 3 months ago by
- Milestone changed from sage-9.6 to sage-9.7
comment:10 Changed 2 months ago by
author name
comment:11 Changed 2 months ago by
comment:12 Changed 2 months ago by
as said in comment:8, there remains a problem about not forgetting g, which causes a failing doctest
comment:13 Changed 7 weeks ago by
- Status changed from needs_review to needs_work
Note: See
TracTickets for help on using
tickets.
The bug seems to be still there, see this recent ask.sagemath question.