       Re: Interval arithmetic and Dependency problems

• To: mathgroup at smc.vnet.net
• Subject: [mg95507] Re: Interval arithmetic and Dependency problems
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Tue, 20 Jan 2009 05:48:02 -0500 (EST)

```On 1/19/09 at 2:56 AM, maderri2 at gmail.com (magma) wrote:

>I just started to have a look at Mathematica capabilities in
>Interval arithmetic.

>It seems that Mathematica does not consider the so called dependency
>problem (see for instance wikipedia on Interval arithmetic for an
>explanation).

>For example evaluate

>f[x_] := x^2 + x f[Interval[{-1, 1}]]

>and you get

>Interval[{-1, 2}]

This comes about due to Mathematica's pattern matching behavior
and the way Mathematica treats a sum of intervals. Due to
pattern matching, the f[Interval[{-1,1}]] evaluates to

Interval[{-1,1}^2 + Interval[{-1,1}]

Each term is independently evaluated and Mathematica assumes the
terms to be independent when combing them into a single
interval. This behavior is easily verified by doing

Trace[f[Interval[{-1,1}]]

Note, once Mathematica gets to Interval[{-1,1}]^2 +
Interval[{-1,1}], that is doing a sum of intervals, the result
has to be Interval[{1,2}] since there is nothing to require the
same value to be chosen from each interval before doing the sum.

That is f[Interval[{-1,1}]] says to do arithmetic on the entire
interval, not a real variable selected from the specified interval.

<snip>

>Interval[{-1, 1}]^2

>Interval[{0, 1}]

>But if the same  "square" is expressed as a product, the result is
>not so good (tight):

>evaluating Interval[{-1, 1}] Interval[{-1, 1}]

>gives Interval[{-1, 1}]

Which is correct. That is, you should not expect Mathematica to
assume dependence in this case.

>It seems to me that a further function should be implemented in
>Mathematica. Something called IntervalEvaluation or similar, with
>syntax like

>IntervalEvaluation[f[x],x,Interval[...]]

>Building this function should not be too difficult, using Maximize
>and Minimize on the given interval.

Certainly, this can be done. Whether it is preferable or not to
the way Mathematica currently does interval arithmetic would
depend on you needs and the problem you are trying to solve. The
cost doing as you suggest is more computation and the wrong