homework 5 question

2 views
Skip to first unread message

decadence...@gmail.com

unread,
Oct 1, 2006, 12:20:23 AM10/1/06
to Math128a-Berkeley
how do you do a natural spline with only 2 points? is A just the
identity and b is 0?!?? that makes no sense... a natural spline is the
same as a free spline right?

for the clamped spline, the first row of b is the entry 3/h0(a1-a0) -
3f'(a), but what is a? it seems like it should just be x0 but that
doesn't work in the example on the top of page 148... this is lame!!!!
and omg midterm! but at least i'm going to the mariah carey concert
monday night

decadence...@gmail.com

unread,
Oct 1, 2006, 12:48:31 AM10/1/06
to Math128a-Berkeley
oh wait, i know what a is for clamped spline, it is just x0, they had a
typo in example 2 saying a0=0 when it should be x0=1... but i still
don't get the natural spline with 2 points

sanaz

unread,
Oct 1, 2006, 2:09:24 AM10/1/06
to Math128a-Berkeley
I think that the natural spline with two points simply represents a
straight line. having free end points tells us that the curveture at
the end points is zero (which in case of only one spline it means a
straight line). you got it right, A is the identity and b is the zero
vector, if you work it out the answer should be:
s(x)=f(x0)+[(f(x1)-f(x0))/(x1-x0)].(x-x0)

Soroosh Yazdani

unread,
Oct 2, 2006, 12:54:30 PM10/2/06
to Math128a...@googlegroups.com
I agree with Sanaz. However, as a side comment. In general, I find it
easier to apply the definition of cubic spline to these examples. In the
case of two points, that means we are looking for one cubic function S=S_0
such that S(x_0)=f(x_0), S(x_1)=f(x_1), and S''(x_0)=S''(x_1)=0. The other
conditions are all vacuous. This degenerates to finding a straight line.

Soroosh

Reply all
Reply to author
Forward
0 new messages