There is a ticket (sorry I don't have these on me, seems to be getting a habit) for this with symbolic integration under something like "Mathematics-style syntax for integrals". It is not hard at all to make (rectangular) regions do this with something nice. The trickier part is maintaining backward-compatibility for the deprecation period, which is presumably why this has stalled. I think that some of the Hussein/Erocal patches under review with Pynac 0.11.0 (?) will make this even easier than it already would have been.
Anyway, presumably something similar should be done with .nintegral and numerical_integral (which should really be a method of Symbolic Expressions, at least ones with one variable if the variable is given, i.e. (x^2).numerical_integral(x,0,1) ). It would also be really good to make sure that numerical_integral can start handling cases with parameters input at run time - am I correct that numerical_integral(f(x,y).subs(x=3),...) still doesn't work that hot? Or is that old info? - kcrisman On Feb 15, 2:37 pm, Robert Bradshaw <[email protected]> wrote: > On Feb 15, 2010, at 11:27 AM, Thomas Scofield wrote: > > > > > Can someone point me to examples/documentation on doing double > > integrals numerically? That is, say you have to calculate a double > > integral with integrand f(x,y) for which no closed-form > > antiderivative (neither in x nor y) exists. Assume my xy-region of > > integration is rectangular. Is there a numerical_integral() type > > command for this case? > > Not that I know of, but you can nest them. For example, to do \int_3^4 > \int_1^x sin(x^2/y) dy dx one can do > > sage: numerical_integral(lambda x: numerical_integral(sin(x^2/y), > 1, x)[0], 3, 4) > (-0.78059401567023834, 8.6663344908170892e-15) > > Note that the [0] on the inner integral causes it to ignore the error > term there. > > - Robert -- 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
