Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: should CAS resturn infinity for divergent integral or a message that
integral diverges?

Replies: 9   Last Post: Apr 19, 2014 1:49 AM

 Messages: [ Previous | Next ]
 Richard Fateman Posts: 1,539 Registered: 12/7/04
Re: should CAS resturn infinity for divergent integral or a message
that integral diverges?

Posted: Mar 17, 2014 7:00 PM

On 3/11/2014 6:04 PM, Nasser M. Abbasi wrote:
> May be this is an API design preference, or may be
> there can be a deep mathematical to prefer one over
> the other.

There are other reasons for an integral to diverge.
For example, integrate(cos(x),x=0..infinity).

Interestingly, Mathematica's NIntegrate on that one
gives 1.3102 x 10^244, after some warning messages.

Maybe it should normalize it to -1/12 :)

>
> Which you think is the better response in the case
> when one asks cas to integrate something that does not
> converge over the limit of integration? return infinity,
> or issue an error message?
>
> What does your CAS return?
>
> ----------------------
> Maple, return infinity:
>
> int(1/sqrt(x),x=0..infinity);
> (* infinity *)
> ----------------------
>
> Mathematica: issues a red message with a beep and
> return the original integral unevaluated:
>
> Integrate[1/Sqrt[x], {x, 0, Infinity}]
> Integrate::idiv: Integral of 1/Sqrt[x] does
> not converge on {0,\[Infinity]}. >>
> Integrate[1/Sqrt[x], {x, 0, Infinity}]
>
> ---------------------
> Matlab mupad, same as Maple:
>
> int( 1/sqrt(x),x,0,inf)
> ans =
>
> Inf
>
> ----------------------
> maxima 12.04: Similar to Mathematica. Gives an error:
>
> integrate(1/sqrt(x),x,0,inf);
> defint: integral is divergent.
> an error. To debug this try: debugmode(true);
>
> ----------------------
>
>
> --Nasser

Date Subject Author
3/11/14 Nasser Abbasi
3/17/14 Richard Fateman
3/17/14 Richard Fateman
3/17/14 D Herring
3/17/14 Nasser Abbasi
3/17/14 D Herring
3/18/14 Axel Vogt
3/18/14 Axel Vogt
3/20/14 Richard Fateman
4/19/14 drhuang57@gmail.com