On Aug 5, 12:07 pm, Nils Bruin <nbr...@sfu.ca> wrote:
> On Aug 5, 8:41 am, Jose Guzman <sjm.guz...@googlemail.com> wrote:
>
> > In either case, Sage returns the same error:
> > TypeError: unable to make sense of Maxima expression
> > 'v(t)=-e^-(t*gL/cm)*(at(integrate((EL*gL+signum(t-5)-signum(t-13))*e^(t*gL/ 
> > cm),t),[t=0,v(t)=-65])-integrate((EL*gL+signum(t-5)-signum(t-13))*e^(t*gL/c 
> > m),t)+65*cm)/cm'
> > in Sage
>
> That seems a bug to me. It is probably because maxima's "at" function

Hmm.  Maxima's at function IS translated, as you can see in that the
final error has 'at' in it.  In calculus.py:

    delayed_functions = maxima_qp.findall(s)
    if len(delayed_functions) > 0:
        for X in delayed_functions:
            if X == '?%at': # we will replace Maxima's "at" with
symbolic evaluation, not an SFunction
                pass
            else:
                syms[X[2:]] = function_factory(X[2:])
        s = s.replace("?%","")

Probably the problem is that this was too naive.  The thing you did
with M(expr).sage() bypasses this, because this 'at' is not
universally imported into the global namespace.  Maybe it should be?

- kcrisman


> similar functionality is available in the form of "substitute" and
> "call". Here is a more direct way of arriving at a similar error
> (requires 4.7.1 for interfacing with the LISP below, but that should
> not be essential for exposing the problem):
>
> sage: M=sage.calculus.calculus.maxima
> sage: E=sage.libs.ecl.ecl_eval
> sage: expr=E("#$at(derivative(f(x),x),[x=0])$")
> sage: M(expr)
> ?%at('diff(f(x),x,1),[x=0])
> sage: M(expr).sage()
> [...]
> TypeError: unable to make sense of Maxima expression 'at(diff(f(x),x,
> 1),[x=0])' in Sage
>
> You can help sage by filing a bug report.

-- 
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

Reply via email to