CenteredInterval

CenteredInterval[x,dx]

for real numbers x and dx gives a centered interval that contains the real interval {a in TemplateBox[{}, Reals]|x-dx<=a<=x+dx}.

CenteredInterval[x+ y,dx+ dy]

gives a centered interval that contains the complex rectangle {a+ⅈ b in TemplateBox[{}, Complexes]|x-dx<=a<=x+dx∧y-dy<=b<=y+dy}.

CenteredInterval[c]

for an approximate number c gives a centered interval that contains all values within the error bounds of c.

Details

  • Centered intervals are also known as center-radius or mid-radius intervals.
  • CenteredInterval is typically used to obtain verified bounds on errors accumulated through numeric computation. Given error bounds for all arguments of a function, centered interval computation provides a reliable bound for the error in the function value.
  • CenteredInterval[] gives a centered interval object Δ with the center and the radius , where and are Gaussian rational numbers with power of two denominators. If and are real, then Δ represents the real interval ; otherwise, Δ represents the complex rectangle .
  • Arithmetic operations and many mathematical functions work with centered interval arguments. f[Δ1,,Δn] yields a centered interval object Δ that contains f[a1,,an] for any aiΔi.
  • IntervalMemberQ can be used to decide interval membership or inclusion between intervals.
  • Relational operators such as Equal and Less yield explicit True or False results whenever they are given disjoint intervals.
  • In StandardForm and related formats, CenteredInterval objects are printed in elided form, with only approximate values of the center and the radius displayed.
  • Normal converts CenteredInterval objects to arbitrary-precision numbers with accuracy corresponding to the radius.
  • Information[CenteredInterval[], prop] gives the property prop of the center-radius interval. The following properties can be specified:
  • "Center"the center of the interval
    "Radius"the radius of the interval
    "Bounds"bounds on the values in the interval
  • Linear algebra operations such as Det, Inverse, LinearSolve and Eigensystem can be used for matrices with CenteredInterval entries.

Examples

open allclose all

Basic Examples  (3)

Construct a real interval:

Evaluate a function at the interval:

Convert the result to an arbitrary-precision number:

Construct a complex interval:

Evaluate a function at the interval:

Extract the exact values of the center and the radius:

Compute bounds on values of on the rectangle :

Approximate the set of values of on the rectangle :

The computed region lies within the bounds:

Scope  (27)

Constructing Center-Radius Intervals  (7)

Construct a real interval by specifying a center and a radius:

Construct a complex interval by specifying a center and a radius:

Construct centered intervals by specifying arbitrary-precision numbers:

Convert a bounded Interval object to a centered interval:

Binary Gaussian rationals are exactly representable as intervals with radius zero:

Other exact numbers are converted to intervals with nonzero radii:

Nonzero machine-precision numbers are treated as numbers with $MachinePrecision precise digits:

Convert machine-precision zero to a center-radius interval:

Interval Arithmetic  (5)

Use arithmetic operations with centered interval arguments:

Use centered intervals as arguments of mathematical functions:

Operations with centered interval and numeric arguments yield centered intervals:

The returned interval contains all values of the function in the input interval:

Interval arithmetic operations return Indeterminate if the set of values is unbounded:

Interval Properties  (5)

Extract the properties of a real interval:

The center and the radius are binary rational numbers:

Find rational bounds for the elements of the interval:

Convert the interval to an arbitrary-precision number:

Extract the center and the radius of a complex interval:

The center and the radius are binary Gaussian rational numbers:

Find Gaussian rational bounds for the elements of the interval:

Convert the interval to an arbitrary-precision number:

Test interval membership:

Test inclusion of intervals:

Visualize the intervals:

Compare real intervals:

If the intervals intersect, the comparison cannot be resolved:

Use IntervalIntersection to compute the intersection:

The empty interval is expressed as Interval[]:

Linear Algebra  (10)

Product of CenteredInterval matrices:

Find random representatives mrep and nrep of m and n:

Verify that mn contains the product of mrep and nrep:

Raise a CenteredInterval matrix to an integer power:

Find a random representative mrep of m:

Verify that mpow contains MatrixPower[mrep,17]:

The exponential of a CenteredInterval matrix:

Find a random representative mrep of m:

Verify that mexp contains the exponential of mrep:

Determinant of a CenteredInterval matrix:

Find a random representative mrep of m:

Verify that mdet contains the determinant of mrep:

Inverse of a CenteredInterval matrix:

Find a random representative mrep of m:

Verify that minv contains the inverse of mrep:

Solve for CenteredInterval matrices:

Find random representatives mrep and brep of m and b:

Verify that sol contains LinearSolve[mrep,brep]:

Eigensystem of a CenteredInterval matrix:

Find an eigensystem for a random representative mrep of m:

Verify that, after reordering and scaling of vectors, vals contain rvals and vecs contain rvecs:

LU decomposition for a CenteredInterval matrix:

Cholesky decomposition for a real symmetric positive definite CenteredInterval matrix:

Characteristic polynomial of a CenteredInterval matrix:

Find a random representative mrep of m:

Verify that the coefficients of p contain the coefficients of the characteristic polynomial of mrep:

Properties & Relations  (2)

Interval arithmetic provides verified bounds on the computation error:

Since , the error for is bounded by :

Arbitrary-precision number arithmetic estimates the error based on the linear term, getting :

Interval represents real intervals given by specifying their endpoints:

Convert the interval to CenteredInterval representation:

Convert it back:

When interval endpoints are not binary rationals, conversion makes the interval larger:

Possible Issues  (1)

Only bounded intervals can be represented as CenteredInterval:

Interval representation allows unbounded intervals:

Wolfram Research (2021), CenteredInterval, Wolfram Language function, https://reference.wolfram.com/language/ref/CenteredInterval.html.

Text

Wolfram Research (2021), CenteredInterval, Wolfram Language function, https://reference.wolfram.com/language/ref/CenteredInterval.html.

CMS

Wolfram Language. 2021. "CenteredInterval." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CenteredInterval.html.

APA

Wolfram Language. (2021). CenteredInterval. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CenteredInterval.html

BibTeX

@misc{reference.wolfram_2023_centeredinterval, author="Wolfram Research", title="{CenteredInterval}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/CenteredInterval.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_centeredinterval, organization={Wolfram Research}, title={CenteredInterval}, year={2021}, url={https://reference.wolfram.com/language/ref/CenteredInterval.html}, note=[Accessed: 19-April-2024 ]}