Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation involving nintegral works with Sage 6.3 but not with Sage 6.4 #17606

Open
sagetrac-alyasoff mannequin opened this issue Jan 8, 2015 · 6 comments
Open

Calculation involving nintegral works with Sage 6.3 but not with Sage 6.4 #17606

sagetrac-alyasoff mannequin opened this issue Jan 8, 2015 · 6 comments

Comments

@sagetrac-alyasoff
Copy link
Mannequin

sagetrac-alyasoff mannequin commented Jan 8, 2015

The following code:

var('u')
assume(u>0)

fu=1/8*(I*sqrt(2)*(erf(1/2*sqrt(2)*(I*pi + 2*u + 1)) - erf(1/2*sqrt(2)*(-I*pi + 2*u + 1)))*e^(u + 1/2) + sqrt(2)*(-I*erf(1/2*sqrt(2)*(I*pi - 2*u + 1)) + I*erf(1/2*sqrt(2)*(-I*pi - 2*u + 1)))*e^(u + 1/2) - (sqrt(2)*e^(1/8) - sqrt(2)*e^(2*u + 1/8))*(erf(1/4*sqrt(2)*(2*I*pi + 4*u + 1)) + erf(1/4*sqrt(2)*(-2*I*pi + 4*u + 1))) - (sqrt(2)*e^(1/8) - sqrt(2)*e^(2*u + 1/8))*(erf(1/4*sqrt(2)*(2*I*pi - 4*u + 1)) + erf(1/4*sqrt(2)*(-2*I*pi - 4*u + 1))))*e^(-u)/sqrt(pi)

fu.nintegral(u,0,2)

returns:

(1.4275778409741315, 3.656408002774788e-14, 63, 0)

with Sage 6.3, but with Sage 6.4 returns:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_4.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZnUubmludGVncmFsKHUsMCwyKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpbwhja8/___code___.py", line 3, in <module>
    exec compile(u'fu.nintegral(u,_sage_const_0 ,_sage_const_2 )
  File "", line 1, in <module>
    
  File "sage/symbolic/expression.pyx", line 10244, in sage.symbolic.expression.Expression.nintegral (build/cythonized/sage/symbolic/expression.cpp:51090)
  File "/usr/lib/sagemath/local/lib/python2.7/site-packages/sage/calculus/calculus.py", line 792, in nintegral
    raise TypeError(err)
TypeError: ECL says: Error executing code in Maxima: 

Component: calculus

Keywords: nintegral, integral

Author: Andrew Lyasoff

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

@sagetrac-alyasoff sagetrac-alyasoff mannequin added this to the sage-6.4 milestone Jan 8, 2015
@jdemeyer
Copy link

jdemeyer commented Jan 8, 2015

comment:1

Attachment: Sage-6.3-6.4-diff.sws.gz

@jdemeyer

This comment has been minimized.

@fchapoton
Copy link
Contributor

comment:3

works fine in 8.9.b7

@fchapoton
Copy link
Contributor

Changed keywords from nintegral to nintegral, integral

@DaveWitteMorris
Copy link
Member

error message from 9.2b12

@DaveWitteMorris
Copy link
Member

comment:5

Attachment: error_with_9-2b12.txt

The lines give me an error with 9.2b12 (on MacOS 10.15.2). Full error message is attached.

RuntimeError: ECL says: Error executing code in Maxima: quad_qags: Cannot numerically evaluate errexp1 at 1.0

During handling of the above exception, another exception occurred:
    ...
TypeError: ECL says: Error executing code in Maxima: quad_qags: Cannot numerically evaluate errexp1 at 1.0.

During handling of the above exception, another exception occurred:
    ...
TypeError: ECL says: Error executing code in Maxima: quad_qags: Cannot numerically evaluate errexp1 at 1.0

No error with 9.1 (on my laptop and on CoCalc).

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants