The following problem was posed: find the cubic not-a-knot spline interpolant of the given function and node vector: $$ \cos(\pi^2x^2), \overrightarrow{t}=[-1,1,4]^T $$ However, isn't it impossible to get a unique solution for this kind of problem when you have 3 nodes?
The definition of the not-a-knot condition was defined as follows: $$ S_1'''(t_1)=S_2''(t_2)\text{ and }S'''_{n-1}(t_{k-1})=S'''_n(t_{k-1}) $$ Where $S_1,\dots,S_n$ are the piecewise interpolants for the nodes $t_0<t_1<\dots<t_n$ and data $y_0,y_1,\dots,y_n$
Therefore, is it not the case that since we only have interpolants $S_1,S_2$, those two conditions will just be one condition, i.e. $S_1'''(t_1)=S_2'''(t_2)$, and so when we set up the matrix to solve the system, that matrix will be singular? i.e. there are $4n$ equations to solve but we only have $4n-1$ conditions.
Your usual spline construction process won’t work, for the reasons you describe.
However, it’s easy to construct a quadratic polynomial that solves the interpolation problem. And you can consider a quadratic to be a cubic, which is just a spline with a single segment.
The cubic interpolant is not unique. You could pick any 4th point you like, and construct a cubic interpolant as I outlined, and every point choice would give a different way of interpolating the original three points.