Piecewise linear interpolation: Difference between revisions
Appearance
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 |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
$$ | $$ | ||
L_i(x)=a_i(x-x_i)+b_i,\, \forall i\in [0,n-1], i \in N\ | |||
$$ | $$ | ||
so that | |||
$$ | |||
L(x)=L_i(x),\, x_i \le x \le x_{i+1} \\ | |||
L_i(x_i)=y_i,\, \forall \{(x_i,y_i)| i\in [0,n], i \in N\} \\ | |||
$$ | |||
<ref>{{#cite:Q2357}}</ref> | |||
== Solution == | == Solution == | ||
| Line 21: | Line 29: | ||
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> | |||
Latest revision as of 19:52, 21 October 2026
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_i(x)=a_i(x-x_i)+b_i,\, \forall i\in [0,n-1], i \in N\ $$
so that
$$\begin{gathered} L(x)=L_i(x),\, x_i \le x \le x_{i+1} \\ L_i(x_i)=y_i,\, \forall \{(x_i,y_i)| i\in [0,n], i \in N\} \\ \end{gathered}$$
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 $$