What's Happening Between Two Points (Redux)?

We will assume that the first x value is still 0 for the moment (we can shift later). Let the next x value be h1.

With new inhomogemeous boundary conditions, we have
u(0)=a, u'(0)=b, u(h1)=c, u'(h1)=d.

The new solution will take the place of the Hermite cubic .

In[62]:=

  Clear[u,x,a,b,c,d]

In[63]:=

  DSolve[{u''''[x]==0,u[0]==a,u'[0]==b,u[h1]==c,u'[h1]==d},
          u[x],x];
  u=Evaluate[u[x]/.Flatten[%][[1]]];
   u

Out[63]=

                                          2
            (-3 a + 3 c - 2 b h1 - d h1) x
  a + b x + ------------------------------- + 
                            2
                          h1
   
                               3
    (2 a - 2 c + b h1 + d h1) x
    ----------------------------
                  3
                h1

In[64]:=

  genherm[x_,a_,b_,c_,d_,h1_]:=a + b x + ((-3 a + 3 c - 2 b h1 - d h1)x^2)/
  
        h1^2 + ((2 a - 2 c + b h1 + d h1)x^3)/h1^3

In[65]:=

  genherm[x,a,b,c,d,h1]

Out[65]=

                                          2
            (-3 a + 3 c - 2 b h1 - d h1) x
  a + b x + ------------------------------- + 
                            2
                          h1
   
                               3
    (2 a - 2 c + b h1 + d h1) x
    ----------------------------
                  3
                h1

Up to Best Bet: Cubic Spline Interpolation