[Maxima] nintegrate - second attempt
andrej.vodopivec at gmail.com
Fri May 25 05:13:15 CDT 2007
On 5/24/07, Barton Willis <willisb at unk.edu> wrote:
> Maybe you could extract the real and imaginary parts of the
> integrand before sending each piece to coerce-float-fun.
> This won't always work; rectform(asin(x)) asks about the sign
> of (x-1)*(x+1). That's OK if the integration interval is
> say [0,1], but it's not OK if the interval is [0,2].
Another version is now at http://wxmaxima.sf.net/nintegrate.lisp . It
has nint_complex option. If nint_complex is true there are a lot of
sign questions so I set it to false by default.
(%i1) nintegrate(x*%i, x, 0, 1);
(%i2) nintegrate(x*%i, x, 0, 1), nint_complex=true;
(%i3) nintegrate(asin(x), x, 2, 3);
(%i4) nintegrate(asin(x), x, 2, 3), nint_complex=true;
This version is now a regular function defined with defmfun, but it
still returns unevaluated if it does not find the numerical value.
This can easily be changed so that it produces an error if this
behavior is not acceptable.
More information about the Maxima