Division by an interval

0

I have a function:

f[x_] := 1792 - 256 x - 2240 x^2 + 320 x^3 + 448 x^4 - 64 x^5 - 6 x^6 + 6 x^7

interval:

inter = Interval[{-4, 3}]

x:

x = Mean@First@(List @@ inter) // N

and formula:

IntervalIntersection[inter, x - (f[x]/((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]))]

The formula doesn't calculates correctly because of division f[x] by interval ((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)])

Though explicitly it can be done by hand, as f[x] == 1349.86 and ((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]) == Interval[{-52452.4, 45111.9}].

So I suppose it f[x]/((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]) should be eq to Interval[{-0.0257349, 0.0299225}] but the result is Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}]

Can you help me to resolve it ?enter image description here

Julia

Posted 2017-04-26T13:56:18.560

Reputation: 113

It seems the issue is that your definition of a reciprocal of an interval is different from the one mathematica uses. What would you expect for 1/Interval[{-1, 1}] ? – george2079 – 2017-04-26T15:03:12.267

One should keep in mind that every time Interval is evaluated with machine precision arguments, the interval is expanded by roughly machine error. This makes an epsilon difference, either literally $MachineEpsilon or in the case of 0., $MinMachineNumber. Not usually important unless you write code that assumes they are unchanged (or your problem is ill-conditioned). – Michael E2 – 2017-05-26T16:19:20.580

Answers

1

f[x]/((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]) equals to Interval[{-[Infinity], -0.0257349}, {0.0299225, [Infinity]}]. Please check the geometric representation of it.

In:

Clear[f, x, a, b, inter]
f[x_] := 1792 - 256 x - 2240 x^2 + 320 x^3 + 448 x^4 - 64 x^5 - 
   6 x^6 + 6 x^7;
inter = Interval[{-4, 3}];
x = Mean@First@(List @@ inter) // N;
IntervalIntersection[inter, 
  x - (f[x]/((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]))];
f[x]/((1/4) f'[x] + (3/4) f'[x + (2/3) (inter - x)]);

a = f[x] (*1349.859375`*)
b = ((1/4) f'[x] + (3/4) f'[
     x + (2/3) (inter - 
         x)]) (*Interval[{-52452.38917824089`,45111.86612654332`}]*)

a/b (*Interval[{-\[Infinity],-0.025734945464790555`},{0.\
029922490264834276`,\[Infinity]}]*)

(*geometric representation of a/b*)   
Plot[a/x1, {x1, -52452.38917824089`, 45111.86612654332`}, 
 Filling -> Axis]

Out:

1349.86
Interval[{-52452.4, 45111.9}]
Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}]

enter image description here

UnchartedWorks

Posted 2017-04-26T13:56:18.560

Reputation: 3 032

ok, how can I divide Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}] into two Interval[{-\[Infinity], -0.0257349}] and Interval[{0.0299225, \[Infinity]}] ? – Julia – 2017-04-26T15:29:19.947

Interval[{-[Infinity], -0.0257349}, {0.0299225, [Infinity]}] is a 2D interval. Interval[{-[Infinity], -0.0257349}] is 1D interval. I am not sure it's feasible. – UnchartedWorks – 2017-04-26T15:52:11.467

1you can do this: Interval /@ List @@ Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}] – george2079 – 2017-04-26T18:45:35.163