Ask Your Question

Revision history [back]

The integrand isn't a real for all (complex) values of x, though. If you wrap the symbolic part in an anonymous function that just does the evaluation (at real values of x in this integral) it will work:

sage: numerical_integral(lambda x: i*sin(i*x), 0, 0.2)
(-0.020066755619075848, 2.2278574117824245e-16)