# Which Properties of a Natural Cubic Spline does the following function possess and not possess

I need to determine which of the properties of a natural cubic spline the following function possesses or does not possess:

$$f(x) = \begin{cases} (x+1)+(x+1)^{3}, & x \in [-1,0] \\ 4+(x-1)+(x-1)^{3}, & x \in (0,1] \end{cases}.$$

However, this function is extremely weird in the sense that I have never seen a spline-like function with one of its intervals only half-open.

I'm thinking that this creates a problem in terms of continuity, because technically, the second piece of the function is not defined at $x=0$, so even though if we plug $x=0$ into that piece, we get the same output as we do from plugging it into the first piece, I'm thinking it's most definitely going to fail continuity at $x=0$. (Moreover, I don't think it would be any different at $f^{\prime}(0)$ or $f^{\prime\prime}(0)$, would it?)

Although, I could be overthinking this problem, or it could be a typo in my textbook. For reference, this is problem 18 in Section 6.4 of Numerical Analysis: Mathematics of Scientific Computing (3$^{\text{rd}}$ edition) by Kincaid and Cheney.

Could somebody please let me know if the half-open interval is a problem?

Thank you.

• You can just plug in 0 to see that it is indeed continuous. – Matt Samuel Dec 18 '15 at 8:23

Next, I guess you're supposed to check that the function has a continuous second derivative at $x=0$, and it's second derivatives at $x=-1$ and $x=1$ are both zero.