User and Internal Domains#
The main goal of Minterpy is to approximate a function
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
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
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
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
where each component map \(\mathcal{T}_i: [a_i, b_i] \rightarrow [-1, 1]\) is given by
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:
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
Applying the change of variables \(\boldsymbol{x}_t = \mathcal{T}(\boldsymbol{x})\) turns the integral over \(\Omega\) into an integral over \([-1, 1]^m\),
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,
The integral of \(Q_f\) over \(\Omega\) therefore reduces to the integral of \(Q\) over \([-1, 1]^m\) scaled by a constant factor,
Differentiation#
Differentiating \(Q_f = Q \circ \mathcal{T}\) with respect to \(x_i\) by the chain rule gives
Since \(\mathcal{T}_i\) is affine, its derivative with respect to \(x_i\) is a constant:
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
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