Method on @infsup: X = fzero (F, X0)
Method on @infsup: X = fzero (F, X0, DF)
Method on @infsup: X = fzero (F, X0, OPTIONS)
Method on @infsup: X = fzero (F, X0, DF, OPTIONS)

Compute the enclosure of all roots of function F in interval X0.

Parameters F and (possibly) DF may either be a function handle, inline function, or string containing the name of the function to evaluate.

The function must be an interval arithmetic function.

Optional parameters are the function’s derivative DF and the maximum recursion steps OPTIONS.MaxIter (default: 200) to use. If DF is given, the algorithm tries to apply the interval newton method for finding the roots; otherwise pure bisection is used (which is slower).

The result is a column vector with one element for each root enclosure that has been be found. Each root enclosure may contain more than one root and each root enclosure must not contain any root. However, all numbers in X0 that are not covered by the result are guaranteed to be no roots of the function.

Best results can be achieved when (a) the function F does not suffer from the dependency problem of interval arithmetic, (b) the derivative DF is given, (c) the derivative is non-zero at the function’s roots, and (d) the derivative is continuous.

It is possible to use the following optimization options: Display, MaxFunEvals, MaxIter, OutputFcn, TolFun, TolX.

Accuracy: The result is a valid enclosure.

f = @(x) cos (x);
df = @(x) -sin (x);
fzero (f, infsup ("[-10, 10]"), df)
  ⇒ ans ⊂ 6×1 interval vector

       [-7.854, -7.8539]
      [-4.7124, -4.7123]
      [-1.5708, -1.5707]
        [1.5707, 1.5708]
        [4.7123, 4.7124]
         [7.8539, 7.854]
sqr = @(x) x .^ 2;
fzero (sqr, infsup ("[Entire]"))
  ⇒ ans ⊂ [-3.2968e-161, +3.2968e-161]

See also: @infsup/fsolve, optimset.

Package: interval