What's Happening Between Two Points (Redux)?
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 .
Clear[u,x,a,b,c,d]
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
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
genherm[x,a,b,c,d,h1]