This is right:
sage: integrate(x, x,-1,1)
0
This error message (which is because I forgot to give the variable of integration) is
completely broken. The "raise err" line in the source code should be just "raise", i.e., delete err, which makes no sense. Or? Anyway, this is just wrong as is.
sage: integrate(x, -1,1)
---------------------------------------------------------------------------
<type 'exceptions.ValueError'> Traceback (most recent call last)
/Users/was/<ipython console> in <module>()
/Users/was/build/sage-2.10.4/local/lib/python2.5/site-packages/sage/calculus/functional.py in integral(f, *args, **kwds)
255 return f.integral(*args, **kwds)
256 except ValueError, err:
--> 257 raise err
258 except AttributeError:
259 pass
<type 'exceptions.ValueError'>: variable name is not a valid Python identifier