Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I learned here that cspline is possibly suitable for my problem. Using the formula bellow for a paticular curve I have a problem and let me ask it.

$p(t)=(2t^3-3t^2+1)\cdot p(0)+(t^3-2t^2+t)\cdot m(0)+$

$+(-2t^3+3t^2)\cdot p(1) +(t^3-t^2)\cdot m(1);$

The test parameter follows.

p0 = 0 ;
m0 = 0 ;
p1 = 1 ;
m1 = 10 ;
t  = 0.05;

In my understanding of the formula , given these parameters , the formula must not result a minus value for p(t) ,for example t=0.05.Though my excel sheet outputs

p(0.05)=-0.0165 .

Is the output all right?

Thank you in advance.

Wikipedia : Cubic Hermite spline

The excel cell expression follows.

=(2*POWER(t,3)-3*POWER(t,2)+1)*p0+(POWER(t,3)-2*POWER(t,2)+POWER(t,1) )*m0+
 (-2*POWER(t,3)+3*POWER(t,2))*p1 +(POWER(t,3)-POWER(t,2))*m1
share|improve this question
That's what I get as well. Where did you see the claim that a Hermite interpolant cannot be negative (it is clearly false)? –  J. M. Feb 17 '12 at 11:18
@J.M. No,I did not. But for my parameters, I felt that it was unnecessary to include such points for any spline curve. But maybe you mean the output is correct. So now I know cspline is not perfect for some cases of my problems. Thank you very much. –  seven_swodniw Feb 17 '12 at 15:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.