Really strange error, a change from (x+2) to (x-2) causes an error? This is
Sage 8.0. This worked 2 years ago but broken now.
#This works:
var ('x,a')
assume(a, 'real')
assume (a > 0)
Psi = sqrt(a)* exp(-a*(abs(x+2)))
integral(Psi^2,x, -oo,oo)
(x, a) 1
#This does not work , changed a "+" sign to "-" sign
var ('x,a')
assume(a, 'real')
assume (a > 0)
Psi = sqrt(a)* exp(-a*(abs(x-2)))
integral(Psi^2,x, -oo,oo)
(x, a) Error in lines 5-5 Traceback (most recent call last): File
"/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 996,
in execute exec compile(block+'\n', '', 'single') in namespace, locals File
"", line 1, in File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/misc/functional.py",
line 721, in integral return x.integral(*args, **kwds) File
"sage/symbolic/expression.pyx", line 12275, in
sage.symbolic.expression.Expression.integral
(/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/expression.cpp:69945)
return integral(self, *args, **kwds) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py",
line 799, in integrate return definite_integral(expression, v, a, b,
hold=hold) File "sage/symbolic/function.pyx", line 996, in
sage.symbolic.function.BuiltinFunction.__call__
(/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:11397)
res = super(BuiltinFunction, self).__call__( File
"sage/symbolic/function.pyx", line 486, in
sage.symbolic.function.Function.__call__
(/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:6440)
res = g_function_evalv(self._serial, vec, hold) File
"sage/symbolic/function.pyx", line 1085, in
sage.symbolic.function.BuiltinFunction._evalf_or_eval_
(/ext/sage/sage-8.0/src/build/cythonized/sage/symbolic/function.cpp:12757)
return self._eval0_(*args) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/integral.py",
line 181, in _eval_ return integrator(*args) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/integration/external.py",
line 34, in maxima_integrator result = maxima.sr_integral(expression, v, a,
b) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py",
line 805, in sr_integral return
max_to_sr(maxima_eval(([max_integrate],[sr_to_max(SR(a)) for a in args])))
File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py",
line 1702, in max_to_sr args=[max_to_sr(a) for a in max_args] File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py",
line 1702, in max_to_sr args=[max_to_sr(a) for a in max_args] File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py",
line 1702, in max_to_sr args=[max_to_sr(a) for a in max_args] File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py",
line 1693, in max_to_sr sage_expr=SR(maxima(expr)) File
"sage/structure/parent.pyx", line 934, in
sage.structure.parent.Parent.__call__
(/ext/sage/sage-8.0/src/build/cythonized/sage/structure/parent.c:9799)
return mor._call_(x) File "sage/structure/coerce_maps.pyx", line 282, in
sage.structure.coerce_maps.NamedConvertMap._call_
(/ext/sage/sage-8.0/src/build/cythonized/sage/structure/coerce_maps.c:6299)
cdef Element e = method(C) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_abstract.py",
line 1257, in _symbolic_ return R(self._sage_()) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_abstract.py",
line 1232, in _sage_ maxima=self.parent()) File
"/ext/sage/sage-8.0/local/lib/python2.7/site-packages/sage/calculus/calculus.py",
line 2151, in symbolic_expression_from_maxima_string raise
TypeError("unable to make sense of Maxima expression '%s' in Sage"%s)
TypeError: unable to make sense of Maxima expression
'if(-(_SAGE_VAR_x-2)>0,(e^-(4*_SAGE_VAR_a)*(e^(2*_SAGE_VAR_a*_SAGE_VAR_x)-2*e^(4*_SAGE_VAR_a)))/(2*_SAGE_VAR_a),-e^(4*_SAGE_VAR_a-2*_SAGE_VAR_a*_SAGE_VAR_x)/(2*_SAGE_VAR_a))'
in Sage
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.