d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Cubic Spline
Add Reply New Topic New Poll
Member
Posts: 38,211
Joined: Feb 16 2009
Gold: 7,823.69
May 22 2013 04:46pm
f(x) = 2x^3 - 6x^2 +8x - 5 (1<=x<=2)
-2x^3 + 18x^2 - 40x + 27 (2<=x<=3)

is f(x) a cubic spline function on [1,3]
is f(x) a natural cubic spline function on [1,3]

This post was edited by brigadier on May 22 2013 04:46pm
Member
Posts: 13,090
Joined: Jun 13 2006
Gold: 0.00
May 22 2013 05:36pm
what's the problem
Member
Posts: 38,211
Joined: Feb 16 2009
Gold: 7,823.69
May 22 2013 05:59pm
Quote (hasuchObe @ May 22 2013 03:36pm)
what's the problem


i think i verified its a cubic spline function

but idk how to verify if its a natural cubic spline function

ive only done this with data points before its more difficult with a piecewise function
Member
Posts: 13,090
Joined: Jun 13 2006
Gold: 0.00
May 22 2013 07:11pm
what does it mean to be a natural cubic spline?
Member
Posts: 7,324
Joined: Dec 22 2002
Gold: 1,261.00
May 23 2013 03:42pm
As I recall, a natural cubic spline is one where the second derivative is zero at both the first and the last knot. Essentially, the spline doesn't "curve" at the end-points, it's just a straight line (but it doesn't have to be horizontal, so first derivative can be non-zero).
In your case, the end-points are 1 and 3. At 1 the second derivative is 12x - 12, so we get 0 when we plug in 1. At 3 the second derivative is -12x + 36. If we plug in 3 we also get 0. So yes, this cubic spline is natural.
Go Back To Homework Help Topic List
Add Reply New Topic New Poll