Home My Page Projects Sollya
Summary Activity Forums Tracker Lists Tasks Docs News SCM Files

[#9821] integral and dirtyintegral do not refuse to work on intervals containing infinities

Date:
2010-03-15 18:09
Priority:
5
State:
Closed
Submitted by:
Christoph Lauter (clauter)
Assigned to:
Christoph Lauter (clauter)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
blocker
Resolution:
None
 
URL:
Summary:
integral and dirtyintegral do not refuse to work on intervals containing infinities

Detailed description
The behavior below is neither the expected one (as documented) nor the desired one:

> integral(exp(x),[-infty;0]);
[@NaN@;@Inf@]
> dirtyintegral(exp(x),[-infty;0]);
0
>

As a matter of course, the integral makes perfect mathematical sense but Sollya should refuse to compute it, giving some kind of a warning.

Followup

Message
Date: 2013-01-11 10:42
Sender: Christoph Lauter

The bug is gone. Closing the tracker.
Date: 2012-02-15 16:52
Sender: Sylvain Chevillard

Should be patched in revision 1640.
@Christoph: please double-check and close.
Date: 2012-02-15 16:12
Sender: Christoph Lauter

Additionnally, both functions should emit the warning

SOLLYA_MSG_DOMAIN_IS_NO_CLOSED_INTERVAL_ON_THE_REALS

for all domains that are not a closed subset of the reals.

Date: 2012-01-09 11:10
Sender: Christoph Lauter

Okay, patch it.
Date: 2012-01-09 11:01
Sender: Sylvain Chevillard

I forgot a word in my previous post, which made it obscure.

Here is an up-to-date output of Sollya on this example:
> integral(exp(x),[-infty,0]);
[@Inf@;@Inf@]
> dirtyintegral(exp(x),[-infty,0]);
0

The behavior of dirtyintegral does not match the specif ("The interval must be bound. If the interval contains one of -Inf or +Inf, the result of dirtyintegral is NaN, even if the integral has a meaning.")

The behavior of integral does not match the specif either. I guess that the previous answer ([NaN, +Inf]) became [+Inf, +Inf] when we wrote sollya_mpfi.
Anyway, if intervals are not allowed to contain NaN anymore, the only correct answer would be [-Inf, +Inf].

Date: 2012-01-09 10:44
Sender: Christoph Lauter

"The behavior of the command 'integral' respects the specifications.

vs.

The behavior does not respect the specif. "

To be correct or not to be correct, that's the question.

Sylvain: could you please comment again?
Date: 2010-04-15 20:44
Sender: Christoph Lauter

@Sylvain: it is long ago that I did some integrals by hand so I am a little rusty. But I still feel that

> dirtyintegral(exp(x),[-infty;0]);
0

is a wrong answer:

int(exp(x),-infty,0) = [exp(x)]^0_{-\infty} = exp(0) - lim(exp(x),x->-infty) = exp(0) - 0 = 1 != 0

Date: 2010-04-15 14:53
Sender: Sylvain Chevillard

The behavior of the command 'integral' respects the specifications. I agree that we could add some warning, but it is not necessary, strictly speaking.

The behavior does not respect the specif. I will change its behavior. Here again, we could add some warning, but it is not required.

@Christoph: please comment on this message.

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2013-01-11 10:42clauter
close_dateNone2013-01-11 10:42clauter
assigned_toschevill2012-02-15 16:52schevill