Skip to content

can not simplify derivative of erf #8568

@sagetrac-gmcmanus

Description

@sagetrac-gmcmanus

Sometimes sage can differentiate erf, but if there are two variables involved it gets confused in simplification and passes too many arguments to erf in maxima.

----------------------------------------------------------------------
| Sage Version 4.3.3, Release Date: 2010-02-21                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: var('c x')
(c, x)
sage: diff(erf(x), x)
D[0](erf)(x)
sage: simplify(diff(erf(x), x))
2*e^(-x^2)/sqrt(pi)
sage: diff(erf(c * x), x)
c*D[0](erf)(c*x)
sage: simplify(diff(erf(c * x), x))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/.../<ipython console> in <module>()

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-x86_64-Linux/local/lib/python2.6/site-packages/sage/calculus/functional.pyc
in simplify(f)
     49     """
     50     try:
---> 51         return f.simplify()
     52     except AttributeError:
     53         return f

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-x86_64-Linux/local/lib/python2.6/site-packages/sage/symbolic/expression.so
in sage.symbolic.expression.Expression.simplify (sage/symbolic/expression.cpp:21495)()

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-x86_64-Linux/local/lib/python2.6/site-packages/sage/symbolic/expression.so
in sage.symbolic.expression.Expression._maxima_ (sage/symbolic/expression.cpp:3435)()

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-x86_64-Linux/local/lib/python2.6/site-packages/sage/structure/sage_object.so
in sage.structure.sage_object.SageObject._interface_ (sage/structure/sage_object.c:3501)()

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-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)

/.../sage-4.3.3-linux-64bit-ubuntu_9.10-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: Error executing code in Maxima
CODE:
        sage4 : (c)*(diff('erf(c, x), c, 1))$
Maxima ERROR:
        
Wrong number of arguments to erf
 -- an error. To debug this try: debugmode(true);

CC: @jasongrout @burcin

Component: calculus

Author: Burcin Erocal, Karl-Dieter Crisman

Reviewer: Karl-Dieter Crisman, Burcin Erocal

Merged: sage-4.6.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/8568

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions