Re: Interval arithmetic and Dependency problems
- To: mathgroup at smc.vnet.net
- Subject: [mg95500] Re: Interval arithmetic and Dependency problems
- From: "David W. Cantrell" <DWCantrell at sigmaxi.net>
- Date: Tue, 20 Jan 2009 05:46:44 -0500 (EST)
- References: <gl1bng$998$1@smc.vnet.net>
magma <maderri2 at gmail.com> 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). The dependency problem is naturally present in interval arithmetic, as you should have gathered from reading the Wikipedia article. It is not Mathematica, but rather the _user_ of Mathematica, that needs to consider dependency when using interval arithmetic. > For example evaluate > > f[x_] := x^2 + x > f[Interval[{-1, 1}]] > > and you get > > Interval[{-1, 2}] > > which is not really very good. > The correct or, if you prefer, best result should be > > Interval[{-1/4,2}] > > since -1/4 and 2 are really the min and max values of f over the given > interval. So, just as the Wikipedia article mentions, you merely need to rewrite your function: f[x_] := (x + 1/2)^2 - 1/4 Then, using Mathematica, f[Interval[{-1, 1}]] yields Interval[{-1/4, 2}]. David