User and Internal Domains#

The main goal of Minterpy is to approximate a function

\[f: \Omega \subset \mathbb{R}^m \rightarrow \mathbb{R}\]

defined on some domain \(\Omega\) (called user domain) via a polynomial approximant \(Q_f\).

Rather than constructing \(Q_f\) directly on \(\Omega\), Minterpy builds a polynomial \(Q\) on the internal domain \([-1, 1]^m\) such that

\[Q_f(\boldsymbol{x}) = Q \circ \mathcal{T} (\boldsymbol{x}) = Q(\mathcal{T}(\boldsymbol{x})), \quad \boldsymbol{x} \in \Omega,\]

where \(\mathcal{T}: \Omega \rightarrow [-1, 1]^m\) is a coordinate transformation from the user domain to the internal domain.

The approximation goal is then

\[f(\boldsymbol{x}) \approx Q_f(\boldsymbol{x}) = Q(\mathcal{T}(\boldsymbol{x})), \quad \boldsymbol{x} \in \Omega.\]

Working internally on \([-1, 1]^m\) is not an arbitrary choice. Classical polynomial approximation theory, including the properties of Chebyshev polynomials and the analysis of interpolation error, is naturally developed on this interval. From a numerical standpoint, rescaling to \([-1, 1]^m\) prevents large growth of monomials and maintains values in a numerically well-behaved range. Minterpy inherits these theoretical results and best practices by anchoring the underlying computations to \([-1, 1]^m\).

In Minterpy, \(Q\) is a multivariate polynomial defined on the internal domain \([-1, 1]^m\). The polynomial \(Q_f = Q \circ \mathcal{T}\) is therefore the object that approximates \(f\) defined on \(\Omega\). \(Q_f\) is what users evaluate, differentiate, and integrate.

The remainder of this page examines the consequences of this composition, which depend on the structure of \(\Omega\), for each of these operations.

Rectangular domains and affine separable transformations#

We focus on the case where \(\Omega\) is a rectangular domain

\[\Omega = [a_1, b_1] \times \cdots \times [a_m, b_m],\]

where \(a_i < b_i\) for each dimension \(i = 1, \ldots, m\).

For such domains, the transformation \(\mathcal{T}: \Omega \rightarrow [-1, 1]^m\) can be constructed as an affine map [1] applied independently per dimension. Specifically, \(\mathcal{T}\) decomposes into separable components

\[\mathcal{T}(\boldsymbol{x}) = \left( \mathcal{T}_1(x_1), \ldots, \mathcal{T}_m(x_m) \right)\]

where each component map \(\mathcal{T}_i: [a_i, b_i] \rightarrow [-1, 1]\) is given by

\[\mathcal{T}_i(x_i) = -1 + \frac{2}{b_i - a_i} (x_i - a_i), \quad x_i \in [a_i, b_i].\]

Given a point \(\boldsymbol{x} \in \Omega\), evaluating \(Q_f\) thus means first transforming \(x\) to \(\mathcal{T}(\boldsymbol{x}) \in [-1, 1]^m\) and then evaluating \(Q\) there.

The inverse transformation \(\mathcal{T}^{-1}_i: [-1, 1] \rightarrow [a_i, b_i]\) is given by:

\[\mathcal{T}^{-1}_i(x_{t, i}) = a_i + \frac{b_i - a_i}{2} (x_{t, i} + 1), \quad x_{t, i} \in [-1, 1].\]

In practice, the inverse transformation is useful in transforming the unisolvent nodes given in \([-1, 1]^m\) to the corresponding values in the function domain.

Integration#

The definite integral of \(Q_f\) over \(\Omega\) can be written as

\[\int_\Omega Q_f(\boldsymbol{x}) \, d\boldsymbol{x} = \int_\Omega Q(\mathcal{T}(\boldsymbol{x})) \, d\boldsymbol{x}.\]

Applying the change of variables \(\boldsymbol{x}_t = \mathcal{T}(\boldsymbol{x})\) turns the integral over \(\Omega\) into an integral over \([-1, 1]^m\),

\[\int_\Omega Q_f(\boldsymbol{x}) \, d\boldsymbol{x} = \int_{[-1, 1]^m} Q(\boldsymbol{x}_t) \lvert \frac{\partial \boldsymbol{x}}{\partial \boldsymbol{x}_t} \rvert \, d\boldsymbol{x}_t.\]

where \(\lvert \frac{\partial \boldsymbol{x}}{\partial \boldsymbol{x}_T} \rvert\) is the Jacobian determinant of the inverse transformation \(\mathcal{T}^{-1}\).

Due to the separable structure of \(\mathcal{T}\), the Jacobian matrix is diagonal, and its determinant reduces to the product of the diagonal entries,

\[\lvert \frac{\partial \boldsymbol{x}}{\partial \boldsymbol{x}_t} \rvert = \prod_{i = 1}^m \frac{\partial x_i}{\partial x_{t, i}} = \prod_{i = 1}^m \frac{b_i - a_i}{2}.\]

The integral of \(Q_f\) over \(\Omega\) therefore reduces to the integral of \(Q\) over \([-1, 1]^m\) scaled by a constant factor,

\[\int_\Omega Q_f(\boldsymbol{x}) \, d\boldsymbol{x} = \left( \prod_{i = 1}^m \frac{b_i - a_i}{2} \right) \int_{[-1, 1]^m} Q(\boldsymbol{x}_t) \, d\boldsymbol{x}_t.\]

Differentiation#

Differentiating \(Q_f = Q \circ \mathcal{T}\) with respect to \(x_i\) by the chain rule gives

\[\frac{\partial Q_f}{\partial x_i} = \frac{\partial Q}{\partial x_{t,i}} \frac{\partial x_{t,i}}{\partial x_i}.\]

Since \(\mathcal{T}_i\) is affine, its derivative with respect to \(x_i\) is a constant:

\[\frac{\partial \mathcal{T}_i}{\partial x_i} = \frac{2}{b_i - a_i},\]

so that the derivative of \(Q_f\) in the user domain is the derivative of \(Q\) in \([-1, 1]^m\) scaled by this constant factor.

For mixed partial derivatives of order \(\boldsymbol{k} = \left(k_1, \ldots, k_m \right)\) with \(k_i \geq 0\), the separable structure of \(\mathcal{T}\) means that the chain rule factors apply independently per dimension, giving

\[\frac{\partial^{k_1 + \cdots + k_m} Q_f}{\partial x_1^{k_1} \cdots \partial x_m^{k_m}} = \frac{\partial^{k_1 + \cdots + k_m} Q}{\partial x_{t,1}^{k_1} \cdots \partial x_{t,m}^{k_m}} \cdot \prod_{i=1}^{m} \left(\frac{2}{b_i - a_i}\right)^{k_i}.\]

Summary#

The object that approximates $f$ on the rectangular user domain \(\Omega\) is \(Q_f = Q \circ \mathcal{T}\). It is what the user evaluates, integrates, and differentiates in their own coordinates. In Minterpy, \(Q\) is specifically a multivariate polynomial defined on the internal reference domain \([-1, 1]^m\), and the coefficients stored internally belong to \(Q\). All user-facing operations, however, act on \(Q_f\). This means:

  • evaluation on \(\Omega\) transparently applies \(\mathcal{T}\) before passing the points to \(Q\),

  • integration takes into account the Jacobian factor arising from the change of variables, and

  • differentiation takes into account the chain rule scaling factors.

In each case, the separable affine structure of \(\mathcal{T}\) keeps the computation of these factors relatively simple: closed-form and dimension-wise separable.

Footnotes