How this calculation works
Enclose the full range of a rational-coefficient bivariate polynomial over a rectangular box using Bernstein coefficients and dyadic subdivision.
min b_ij ≤ p(x,y) ≤ max b_ij on each cell; combine all cell bounds to enclose the full rectangle.A worked example
For p(x,y)=x²+y² on [−1,1]² at subdivision depth 1, the exact outer range is [0,2]. The sampled cell corners also attain zero and two, closing the gap for this particular example.
Good to know
Rational coefficient/exponent rows, at most 49 terms, exponents 0–6 per variable, strictly ordered rational rectangle and depth 0–5. Exact rational conversion and coefficient enclosure, 200000 weighted-operation cap, first 64 cells displayed. Outer bounds distinguished from attained corner samples; no false attainment or complete global optimizer claim.
Reference: Primary author or official method documentation (opens in a new tab) ↗
Enclose every point, not just a grid
The task is to bound every polynomial value in an entire rectangle. Sampling a fine grid can miss a peak or trough between grid points, so the smallest and largest sampled values alone do not solve that problem. This calculator uses the range-enclosure property of the tensor-product Bernstein basis instead.
On a cell mapped to the unit square, each Bernstein basis function is nonnegative and their sum is one. The polynomial value is therefore a weighted average of its Bernstein coefficients. Their minimum and maximum enclose all values on that cell, whether or not the extreme coefficient itself is attained by the polynomial.
Compare this with the Polynomial sum of squares certificate calculator. Enclose all polynomial values on a specified box using Bernstein coefficient bounds and subdivision; a global SOS decomposition proves nonnegativity for a narrower polynomial class without giving box range bounds.
Enter coefficients and exponents explicitly
Each term row contains a rational coefficient followed by a nonnegative integer x exponent and y exponent. The page supports exponents through six in either variable and a bounded number of rows. It accepts polynomial data rather than an arbitrary expression containing transcendental functions, hidden parameters or unrecognized symbolic syntax.
The rectangle is entered as xmin, xmax, ymin, ymax with strict increasing bounds in each direction. Rational values are retained exactly during the conversion and comparison. The implementation does not first round them to a pixel grid or treat a very small positive width as zero under an arbitrary geometric tolerance.
Follow the default enclosure
The default polynomial is x²+y² over [−1,1]×[−1,1]. At depth one, the rectangle splits into four equal cells. Bernstein coefficient bounds on those cells give the exact outer interval [0,2]. The origin is one of the cell corners and attains zero; the four original rectangle corners attain two.
Because the attained samples match both outer endpoints in this example, the range is fully resolved. That coincidence must not be generalized to every polynomial. An outer lower bound can lie below the true minimum, and a corner sample can miss an interior extremum even when the coefficient conversion itself is exact.
Convert the basis cell by cell
For each cell, an affine substitution maps x and y to unit-square coordinates. Expanding the entered power-basis terms under that substitution gives local coefficients. Exact binomial relations then convert them to a Bernstein coefficient array, whose extrema provide that cell’s enclosure under the nonnegative partition-of-unity property.
The global lower endpoint is the smallest cell lower bound, and the global upper endpoint is the largest cell upper bound. These endpoints need not come from the same cell. The result also evaluates cell corners and reports the smallest and largest attained sample values separately, creating an explicit inner comparison rather than confusing samples with guarantees.
Understand what subdivision can improve
Depth d splits each coordinate direction into 2^d intervals, producing 4^d cells. Smaller cells can tighten coefficient enclosures because the polynomial varies over a shorter region. This creates a trade-off between a narrower range and the cost of exact rational arithmetic, whose numerator and denominator sizes can grow.
The permitted depth is zero through five, with an additional weighted-operation cap. Only the first 64 cell records are displayed, but every completed cell contributes to the global endpoints. Reaching a resource cap is an error, not permission to publish bounds from only the first cells that happened to finish.
Read exact bounds without claiming exact extrema
Exact rational arithmetic makes the returned Bernstein outer bounds rigorous for the entered rational polynomial and box when the complete calculation succeeds. It does not make the enclosure equal to the exact range automatically. A rational coefficient bound is an inequality statement; it is not necessarily a point where the polynomial takes that value.
The attained sample minimum is an upper bound on the true minimum, while the attained sample maximum is a lower bound on the true maximum. Comparing those inner values with the outer enclosure shows how much remains unresolved. Keep the direction of each inequality clear when using the result to establish positivity or another domain-wide property.
Use the enclosure as a mathematical certificate
If the outer lower endpoint is positive, every polynomial value on the rectangle is positive. If that endpoint is negative, the result alone does not prove a negative value exists; the bound may simply be loose. Conversely, a negative attained sample is an actual witness of negativity at its sampled location.
This task differs from finding a sum-of-squares identity that proves a polynomial nonnegative globally. The rectangle-specific Bernstein enclosure works with the entered domain and exposes a range interval. It does not claim a general symbolic extrema solver, return roots of stationary equations automatically or replace unresolved gaps with a guessed optimal value.
A few questions, answered
Why is this stronger than sampling?
Bernstein coefficients bound every value in each completed cell. A finite grid only shows values at its sample points and can miss interior extremes.
Does an outer bound have to be attained?
No. The polynomial may never reach the extreme Bernstein coefficient. Attained corner-sample values are shown separately.
Does a negative lower bound prove the polynomial is negative somewhere?
No. It may be a loose enclosure. A negative sampled value would provide a real witness, while a positive outer lower bound proves positivity on the box.
Why display only 64 cells?
The display is bounded for readability; all completed cells contribute to the global range. A computation cap causes rejection rather than an incomplete enclosure.