Status: New
Owner: ----
New issue 241 by
grant.wa...@gmail.com: This integral will not work
http://code.google.com/p/mpmath/issues/detail?id=241
What steps will reproduce the problem?
>>> from mpmath import *
>>> mystring
>>> = "mpf('2')/(mpf('6')-mpf('2')*cos(y))**(mpf('1')/mpf('2'))*ellipk(mpf('2')/(mpf('3')-cos(y)))"
>>> def func(y):
... out = eval(mystring)
... return out
...
>>> mp.dps = 30
>>> myint = quad(func,[0,pi])
>>> print myint
+inf
What is the expected output? What do you see instead?
The output I expect should be similar to maple or scipy.
Maple answer: 6.34499346714920200531149676632
scipy answer: 6.3449934671492025
using Gauss-legendre: 6.34493993891195322762533970189
What version of the product are you using? On what operating system?
I'm using mpmath 0.17, on Mac OSX 10.6.8
Please provide any additional information below.
I tried some other things, such as trying different precisions (as high as
160, as low as 15), turning up maxdegree to 20. I turned on the verbose
option, and it outputs:
Integrating from 0 to 3.14159 (degree 1 of 6)
Integrating from 0 to 3.14159 (degree 2 of 6)
('Estimated error:', 'nan')
Integrating from 0 to 3.14159 (degree 3 of 6)
As an independent check, I compared the function "func" for various values
of y in maple and as implemented above. These agreed.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings