Jump to content

Piecewise linear interpolation: Difference between revisions

From Wikibase
Created page with "'''Piecewise linear interpolation''' is the process of finding a series of linear functions $L_i(x)$ that for a definite set of datapoints $\{(x_i,y_i)|\ i\in [0,n], i \in N\}$ satisfies $L(x_i)=y_i$. i.e., find $$ L(x)=L_i(x),\, x_i \le x \le x_{i+1} \forall \{(x_i,y_i)| i\in [0,n], i \in N\} \\ L_i(x)=a_i(x-x_i)+b_i $$ == Solution == By definition, $$ L_i(x_i)=y_i,\, L_i(x_{i+1})=y_{i+1} $$ Hence $$ a_i=\frac{y_{i+1}-y_i}{x_{i+1}-x_i},\, b_i=y_i $$"
 
No edit summary
Line 7: Line 7:
L_i(x)=a_i(x-x_i)+b_i
L_i(x)=a_i(x-x_i)+b_i
$$
$$
<ref>{{#cite:Q2357}}</ref>


== Solution ==
== Solution ==
Line 21: Line 23:
a_i=\frac{y_{i+1}-y_i}{x_{i+1}-x_i},\, b_i=y_i
a_i=\frac{y_{i+1}-y_i}{x_{i+1}-x_i},\, b_i=y_i
$$
$$
<ref>{{#cite:Q2357}}</ref>

Revision as of 19:38, 21 October 2026

Languages: English · français · Esperanto

Piecewise linear interpolation is the process of finding a series of linear functions $L_i(x)$ that for a definite set of datapoints $\{(x_i,y_i)|\ i\in [0,n], i \in N\}$ satisfies $L(x_i)=y_i$.

i.e., find

$$\begin{gathered} L(x)=L_i(x),\, x_i \le x \le x_{i+1} \forall \{(x_i,y_i)| i\in [0,n], i \in N\} \\ L_i(x)=a_i(x-x_i)+b_i \end{gathered}$$

[1]

Solution

By definition,

$$ L_i(x_i)=y_i,\, L_i(x_{i+1})=y_{i+1} $$

Hence

$$ a_i=\frac{y_{i+1}-y_i}{x_{i+1}-x_i},\, b_i=y_i $$

[1]