Jump to content

Multidimensional interpolation: Difference between revisions

From Wikibase
comma before parenthetical clause; AI-assisted (RonzzWikiCowriter) (via update-page on MediaWiki MCP Server)
attach citation to its sentence and fill in the pointwise worked example; AI-assisted (RonzzWikiCowriter) (via update-page on MediaWiki MCP Server)
Line 259: Line 259:
Then perform $n^{m-3}$ 1D interpolation in $x_3$, $n^{m-4}$ 1D interpolation in $x_4$... $n$ 1D interpolation in $x_{m-1}$, and finally $1$ 1D interpolation in $x_m$ to obtain one interpolating function $f^{(x_m)}$.
Then perform $n^{m-3}$ 1D interpolation in $x_3$, $n^{m-4}$ 1D interpolation in $x_4$... $n$ 1D interpolation in $x_{m-1}$, and finally $1$ 1D interpolation in $x_m$ to obtain one interpolating function $f^{(x_m)}$.


Then the estimate of $y$ at $(x_1^*,\cdots,x_m^*)$ is $f^{(x_m)}(x_m^*)$.
Then the estimate of $y$ at $(x_1^*,\cdots,x_m^*)$ is $f^{(x_m)}(x_m^*)$.<ref>{{#cite:Q2421}}</ref>


<ref>{{#cite:Q2421}}</ref>
{{Hidden example}}
'''Surface temperature over a square of weather stations, by successive 1D interpolation.'''
 
Take the same sixteen weather stations as above.
 
What is the interpolated temperature at $51.6^\circ \textbf{N}, 1.4^\circ \textbf{E}$?
 
'''Algebraic solution''':
 
'''Step 1: interpolate in $x_1$ (latitude).''' Fix the longitude at each of its four known values, and interpolate the four readings along latitude with the one-dimensional Lagrange polynomial, evaluated at $x_1^*=51.6$:
 
$$
L^{(x_1)}_{1}(51.6)=-0.056,\qquad L^{(x_1)}_{2}(51.6)=0.448,\qquad L^{(x_1)}_{3}(51.6)=0.672,\qquad L^{(x_1)}_{4}(51.6)=-0.064
$$
 
Hence the four interpolated readings
 
$$
y_{x_1^*,i_2}=\sum_{i_1=1}^{4}y_{i_1,i_2}\,L^{(x_1)}_{i_1}(51.6),\qquad i_2=1,2,3,4
$$
 
{| class="wikitable"
|+ Interpolated temperature ($^\circ$C) at $51.6^\circ$N
! longitude $x_{2,i_2}$ !! $0^\circ$E !! $1^\circ$E !! $2^\circ$E !! $3^\circ$E
|-
! $y_{x_1^*,i_2}$
| 20.7744 || 21.5808 || 22.9800 || 24.1352
|}
 
'''Step 2: interpolate in $x_2$ (longitude).''' Interpolate these four readings along longitude with the same one-dimensional Lagrange polynomial, evaluated at $x_2^*=1.4$:


{{Hidden example}}
$$
<!-- reuse the weather station grid example and perform point-wise interpolation with 1D Lagrange polynomials -->
L^{(x_2)}_{1}(1.4)=-0.064,\qquad L^{(x_2)}_{2}(1.4)=0.672,\qquad L^{(x_2)}_{3}(1.4)=0.448,\qquad L^{(x_2)}_{4}(1.4)=-0.056
$$
 
$$
P(51.6,1.4)=\sum_{i_2=1}^{4}y_{x_1^*,i_2}\,L^{(x_2)}_{i_2}(1.4)=-0.064(20.7744)+0.672(21.5808)+0.448(22.9800)-0.056(24.1352)
$$
 
$$
{}=22.1162
$$
 
which agrees with the value obtained above from the full two-variable polynomial, without ever forming that polynomial: $4$ one-dimensional interpolations in latitude, followed by $1$ in longitude, sufficed.
{{End hidden}}
{{End hidden}}



Revision as of 19:28, 27 October 2026

Languages: English · français · Esperanto

Multidimensional interpolation is the process of finding a multivariable function $f(x_1,\cdots,x_m)$ that for a definite set of datapoints $\{(x_{1,i},\cdots,x_{m,i},y_i)\mid i\in [0,n], i \in \mathbb{N}\}$ satisfies $f(x_{1,i},\cdots,x_{m,i})=y_i$.

Grid interpolation

via Lagrange polynomial in multiple variables

If a "grid" of $n^m$ datapoints, i.e., values of $y$ at all possible combinations of $n$ particular values in each of the $m$ variables

$$ \{(x_{1,i_1},\cdots,x_{m,i_m},y_{i_1,\cdots,i_m})\mid i_1,\cdots,i_m \in [0,n-1],\, i_1,\cdots,i_m \in \mathbb{N}\} $$

is known, then a multivariable-version of the Lagrange polynomial can be used to interpolate for $y$.

$$ P(x_1,\cdots,x_m)=\sum_{i_1=0}^{n-1}\cdots\sum_{i_m=0}^{n-1}y_{i_1,\cdots,i_m}\prod_{j=1}^{m}L^{(x_j)}_{i_j}(x_j),\qquad L^{(x_j)}_{i_j}(x_j)=\prod_{\substack{k=0\\k\neq i_j}}^{n-1}\frac{x_j-x_{j,k}}{x_{j,i_j}-x_{j,k}} $$

which is a multi-variable polynomial of degree at most $n-1$ in each variable unique for each set of datapoints.

Similar to the one-dimensional Lagrange polynomials,

$$ L^{(x_j)}_{i_j}(x_j)= \begin{cases} 1, & x_j=x_{j,i_j},\\ 0, & x_j=x_{j,i_k},\, i_k \in [0,n-1],\, i_k \neq i_j,\, i_k \in \mathbb{N} \end{cases} $$

which guarantees that $P(x_1,\cdots,x_m)=y(x_1,\cdots,x_m)$ at all datapoints.[1]

$P(x_1,\cdots,x_m)$ is also known as the tensor product Lagrange interpolant.

Pointwise interpolation

Pointwise interpolation estimates the value of $y$ at one particular point, $y(x_1^*,\cdots,x_m^*)$, without constructing a general interpolating function.

via successive 1D interpolation in each variable

If a "grid" of $n^m$ datapoints, i.e., values of $y$ at all possible combinations of $n$ particular values in each of the $m$ variables

$$ \{(x_{1,i_1},\cdots,x_{m,i_m},y_{i_1,\cdots,i_m})\mid i_1,\cdots,i_m \in [0,n-1],\, i_1,\cdots,i_m \in \mathbb{N}\} $$

is known, then first perform $n^{m-1}$ 1D interpolation in $x_1$, fixing $x_2,\cdots,x_m$ at all known values, obtaining $n^{m-1}$ interpolating functions $f^{(x_1)}_{i_2,i_3,\cdots,i_m}(x_1)$

Now evaluate each $f^{(x_1)}$ at $x_1=x_1^*$ to obtain $n^{m-1}$ interpolated datapoints

$$ \{(x_1^*,x_{2,i_2},\cdots,x_{m,i_m},y_{x_1^*,i_2,\cdots,i_m})\mid i_2,\cdots,i_m \in [0,n-1],\, i_2,\cdots,i_m \in \mathbb{N}\} $$

Then perform $n^{m-2}$ 1D interpolation in $x_2$, fixing $x_3,\cdots,x_m$ at all known values, obtaining $n^{m-2}$ interpolating functions $f^{(x_2)}_{i_3,\cdots,i_m}(x_2)$

Now evaluate each $f^{(x_2)}$ at $x_2=x_2^*$ to obtain $n^{m-2}$ interpolated datapoints

$$ \{(x_1^*,x_2^*,x_{3,i_3}, \cdots,x_{m,i_m},y_{x_1^*,x_2^*,i_3,\cdots,i_m})\mid i_3,\cdots,i_m \in [0,n-1],\, i_3,\cdots,i_m \in \mathbb{N}\} $$

Then perform $n^{m-3}$ 1D interpolation in $x_3$, $n^{m-4}$ 1D interpolation in $x_4$... $n$ 1D interpolation in $x_{m-1}$, and finally $1$ 1D interpolation in $x_m$ to obtain one interpolating function $f^{(x_m)}$.

Then the estimate of $y$ at $(x_1^*,\cdots,x_m^*)$ is $f^{(x_m)}(x_m^*)$.[2]

References