0
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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}] ? $\endgroup$ – george2079 Apr 26 '17 at 15:03
  • $\begingroup$ 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). $\endgroup$ – Michael E2 May 26 '17 at 16:19
1
$\begingroup$

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

$\endgroup$
  • $\begingroup$ ok, how can I divide Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}] into two Interval[{-\[Infinity], -0.0257349}] and Interval[{0.0299225, \[Infinity]}] ? $\endgroup$ – Julka Apr 26 '17 at 15:29
  • $\begingroup$ 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. $\endgroup$ – UnchartedWorks Apr 26 '17 at 15:52
  • 1
    $\begingroup$ you can do this: Interval /@ List @@ Interval[{-\[Infinity], -0.0257349}, {0.0299225, \[Infinity]}] $\endgroup$ – george2079 Apr 26 '17 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.