How Can I Find the Cubic Spline Function for This Data?

  • Thread starter Thread starter Lilia
  • Start date Start date
  • Tags Tags
    Function
Lilia
Messages
47
Reaction score
0

Homework Statement


i need to find the cubic spline function for this data:
x: 5 6 9
y: 1 3 5

Homework Equations


Sm(x,∆) = Pm,k(x) = a0k + a1k*x + ... + amk*x^m

The Attempt at a Solution


s3 = a0 + a1*x + a2*x^2 + a3*x^3, [5,6]
b0 + b1*x + b2*x^2 + b3*x^3, [6,9]

in class we wrote s2(x, ∆) which is the same as above without the terms containing x^3 where there were 6 variables (a0, a1, a2, b0, b1, b2) and i got 5 equations by replacing x in above equations with 5,6,9. then replaced obe of the variables with constant: b2 = c, and thus found other 5 variables. here is the system of the equations for s2:
a0 + a1*5 + a2*5^2 = 1
a0 + a1*6 + a2*6^2 = 3
b0 + b1*6 + b2*6^2 = 3
b0 + b1*9 + b2*9^2 = 1
a1 + 2a2*x | {x=6} = b1 + 2b2*x | {x=6} // derivatives are equal in the middle point

what should i do here? i wrote the above equations for s3 too but, for s3 i have 8 variables and again 5 equations? how can this happen? are the equations correct?
 
Physics news on Phys.org
someone?
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top