Not sure if this is the right place to ask. If so, please let me know.
I am performing cubic spline interpolation to produce a globally $C^2([a,b])$ function $S(x)$ on the one-dimensional interval $[a,b]$. Lets call the interpolation points $x_1 = a, \dots, x_n = b$ and the interpolation values $y_1, \dots, y_n$.
I would like to express the interpolating spline as $$S(x) = \sum\limits_{i=1}^{n-1} S_i(x) y_i \quad \in C^2([a,b])$$ , where $S_i(x) = a_ix^3 + b_ix^2 + c_ix + d_i$ are the local splines defined on $[x_i, x_{i+1}]$
The above sum is of course only correct if $S_i(x)$ is zero for $x \notin [x_i, x_{i+1}]$, that is, if $S_i(x)$ is defined as a piecewise function: $$S_i(x) = a_ix^3 + b_ix^2 + c_ix + d_i \quad \text{for} \quad x \in [x_i, x_{i+1}] $$ $$S_i(x) = 0 \quad else $$
But defining $S_i(x)$ as a piecewice function on the entire interval $[a,b]$ makes it a discontinuous function, right?
Is there like a nice terminology to write cubic splines as linear combination of interpolation values times local splines? Maybe my question boils down to "how to define the local splines $S_i(x)$ on the entire interpolation interval".