Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think you can use something along the lines of

CC=ComplexBallField(100)
f=fast_callable(e^(I*(x+x^3/3)),vars=[x],domain=CC)
CC.integral(lambda x,_: f(x)  ,CC(0),CC(1))

which gets you a result along the lines of:

[0.7778906934510079480835322919 +/- 3.85e-29] + [0.5105422937539419671472249270 +/- 1.82e-29]*I

Exciting part: these error bounds are meant to be certified! No other computer algebra package will give you certified numerical integrals. This is using ARB, see http://fredrikj.net/blog/2017/11/new-rigorous-numerical-integration-in-arb/

Caveat: this is rather new code, so the interface hasn't been tested very much yet. In particular, while the code above should propagate intervals properly through f, it could easily be the case that some funny intermediate coercion step loses a ball radius somewhere. The integrator does depend on correct propagation of ball radii.