Piecewise Linear Interpolation

Thomas J. Kennedy

Contents:

1 Brute-Force Definition

If $p$ represents the entire piecewise function then $p_i$ represents the part of p that applies to the $i^{th}$ subdomain. Therefore $p_i$ is defined as

$$ p_i(t) = m_i(t) + b_i $$

where

$$ y_i = f(t_i) $$

$$ m_i = \frac{y_{i+1} - y_i}{t_{i+1} - t_i} $$

$$ b_i = y_i - m_i t_i $$

Based on these definitions:

2 Into the Notation Rabbit Hole

Our definition leads us to…

$$ p(t) = \begin{cases} p_{0} = m_{0}t + b_{0} & \text{if } t \in [t_{0}, t_{1}) \\ p_{1} = m_{1}t + b_{1} & \text{if } t \in [t_{1}, t_{2}) \\ \vdots \\ p_{i} = m_{i}t + b_{i} & \text{if } t \in [t_{i}, t_{i+1}) \\ \vdots \\ p_{} = m_{n-1}t + b_{n-1} & \text{if } t \in [t_{n-1}, t_{n}) \\ \end{cases} $$

We can clean up this definition with a weight function…

$$ w_i(t) = \begin{cases} 1 & \text{if } t \in [t_i, t_{i+1}) \\ 1 & \text{if } t = t_n \\ 0 & \text{otherwise} \end{cases} $$

Using the weight function… $p_i(t)$ can be written as

$$ p(t) = \sum\limits_{i=0}^{n} w_i(t)p_i(t) $$

Divided differences can simplify notation further…

$$ p(t) = f_i + (t - t_i) f[t_i, t_i+1] $$

3 Local View

Piecewise linear interpolation uses only local information for each subdomain, i.e., two points:

Adjacent pieces match at shared endpoints, i.e.,

$$ p_i(t_{i+1}) = p_{i+1}(t_{i+1}) $$

However both rate-of-change

$$ p^{\prime}_i(t_{i+1}) \neq p^{\prime}_{i+1}(t_{i+1}) $$

and concavity

$$ p^{\prime\prime}_i(t_{i+1}) \neq p^{\prime\prime}_{i+1}(t_{i+1}) $$

are not considered. This means that every point in the form

$$ (t_i, f(t_i)) $$

represents a point of discontinuity.