1. Test the Interval Arithmetic Library
Consider the intervals I1=[0,1], I2=[2,3] and I3=[-2,-1] and compute:
   a) The left and right bounds of the intervals.
      I1: [0, 1] left: 0 right: 1
      I2: [2, 3] left: 0 right: 1
      I3: [-2, -1] left: 0 right: 1
   b) The center and width of the intervals.
      I1: [0, 1] center: 0.5 width: 1
      I2: [2, 3] center: 0.5 width: 1
      I3: [-2, -1] center: 0.5 width: 1
   c) I1+I2, I2-I3, I1xI2, I2/I3 and I2/I1.
      I1+I2 = [2, 4]
      I2-I3 = [3, 5]
      I1xI2 = [0, 3]
      I2/I3 = [-3, -1]
      I2/I1 = [2, inf]
   d) I1&I2, I1|I2, (I2|I3)&2I1 and I3^3.
      I1&I2 = [ empty ]
      I1|I2 = [0, 3]
      (I2|I3)&2I1 = [0, 2]
      I3^3 = [-8, -1]
   e) I1x(I2+I3) and I1xI2+I1xI3.
      I1x(I2+I3) = [0, 2]
      I1xI2+I1xI3 = [-2, 3]
   f) Let I1=[0.5,1], I2=[2,2.5] and I3=[-2,-1] and compute again e).
      I1x(I2+I3) = [-0, 1.5]
      I1xI2+I1xI3 = [-1, 2]

2. Interval Functions
Consider the interval expressions X1-X1^2, X1x(1-X1) and 0.25-(X1-0.5)^2.
   F1: _f_0:(X1)->(X1-X1^2)
   F2: _f_1:(X1)->(X1*(1-X1))
   F3: _f_2:(X1)->(0.25-(X1-0.5)^2)
   a) Evaluate each expression with X1=[0.5,2].
      F1([0.5, 2]) = [-3.5, 1.75]
      F2([0.5, 2]) = [-2, 1]
      F3([0.5, 2]) = [-2, 0.25]
   b) For each expression, evaluate with X1=[0.5,1.25] and with X1=[1.25,2],
      and compute the union hull of the results.
      F1([0.5, 1.25]) = [-1.0625, 1]
      F1([1.25, 2]) = [-2.75, 0.4375]
      F1([0.5, 1.25]) | F1([1.25, 2]) = [-2.75, 1]
      F2([0.5, 1.25]) = [-0.3125, 0.625]
      F2([1.25, 2]) = [-2, -0.3125]
      F2([0.5, 1.25]) | F2([1.25, 2]) = [-2, 0.625]
      F3([0.5, 1.25]) = [-0.3125, 0.25]
      F3([1.25, 2]) = [-2, -0.3125]
      F3([0.5, 1.25]) | F3([1.25, 2]) = [-2, 0.25]

3. Interval Extensions
Consider the univariate polynomial function expressed in the standard form as: f(x)=x^3-x^2-x
   Standard form: _f_3:(x)->((x^3-x^2)-x)
   a) Express this function in the Horner form.
      f(x)=x(x^2-x-1)=x(x(x-1)-1)
      Horner form: _f_4:(x)->(x*((x*(x-1))-1))
   b) Express this function in the Factored form.
      f(x)=x(x^2-x-1)
      the roots of x^2-x-1 are: (1+sqrt(5))/2 and (1-sqrt(5))/2
      f(x)=x*(x-(1+sqrt(5))/2)*(x-(1-sqrt(5))/2)
      Factored form: _f_5:(x)->((x*(x-1.61803))*(x--0.618034))
   c) Compute the enclosure for the range of the function in [-1,1] with each of the 3 forms.
      Which one is tighter?
      Standard form: f([-1, 1]) = [-3, 2] (width: 5)
      Horner form: f([-1, 1]) = [-3, 3] (width: 6)
      Factored form: f([-1, 1]) = [-4.23607, 4.23607] (width: 8.47214)
      Standard form is tighter!
   d) Use the form that produced the tighter enclosure in c) and compute a smaller enclosure based
      on the subdivision of the previous interval into 4 intervals of width 0.5.
      Standard form: f([-1, 1]) = f([-1, -0.5]) | f([-1, -0.5]) | f([-0.5, 0]) | f([0, 0.5]) | f([0.5, 1])
      Standard form: f([-1, -0.5]) = [-1.5, 0.625]
      Standard form: f([-0.5, 0]) = [-0.375, 0.5]
      Standard form: f([0, 0.5]) = [-0.75, 0.125]
      Standard form: f([0.5, 1]) = [-1.875, 0.25]
      Standard form: f([-1, 1]) = [-1.875, 0.625]
   e) Define a function that based on the monotonicity of f computes a sharp enclosure of the range of
      the function for any interval [a,b].
      f'(x)=3x^2-2x-1
      the roots of 3x^2-2x-1 are: -1/3 and 1
      f([a,b]) -> f([a]) | f([b])  | f([-1/3]) | f([1])
      f([-1, 1]) -> f([-1]) | f([1])  | f([-1/3]) | f([1])
      f([-1, 1]) -> [-1, 0.185185]
   f) Define a function that computes an enclosure obtained by the mean value extension of f over
      any interval [a,b] centered at the midpoint.
      Fc(x) = f(c) + F'([a,b])(x-c)
      c = (a+b)/2
      f(c) = c^3-c^2-c
      F'([a,b]) = 3[a,b]^2-2[a,b]-1
      Fc(x) = c^3-c^2-c + (3[a,b]^2-2[a,b]-1)(x-c) with c = (a+b)/2
      Mean value form for [a,b]=[-1, 1] : _f_6:(x)->(-0+([-3,4]*(x-0)))
      Fc([-1, 1]) = [-4, 4]

4. Sharp enclosure of the range of a real function
Implement a function that given a generic real function f, an arbitrary interval [a,b] and a precision e,
computes a sharp enclosure of the range of f in [a,b] with the following procedure:
   a) Computes a sequence of intervals that contain all the zeros of the derivative of f. All the intervals
   must have the width smaller that the given precision e.
   b) Computes the enclosure of the range of f in [a,b] based on the obtained sequence of intervals.
_f_7:(x)->((x^3-x^2)-x)([-1, 1]) = [-1.00293, 0.186162] (with precision = 0.001)
_f_7:(x)->((x^3-x^2)-x)([-1, 1]) = [-1, 0.185186] (with precision = 1e-006)
_f_7:(x)->((x^3-x^2)-x)([-2, 2]) = [-10, 2] (with precision = 1e-006)