One can also use scipy (faster) or mpmath (very slow) sage: import scipy.integrate sage: scipy.integrate.dblquad(lambda x,y:abs(cos(x+y)),0,pi,lambda x: 0,lambda x:pi) (6.2831850310568189, 8.0696816340264377e-08) sage: n(2*pi) 6.28318530717959
sage: from mpmath import * sage: mp.dps = 50; mp.pretty = True sage: f=lambda x,y:abs(cos(x+y)) sage: quad(f,[0,pi],[0,pi],error=True) (6.2831855317509475219920730867134288376181856252723, 0.000001) Andrzej Chrzeszczyk -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
