Results 1 to 15 of 15

Math Help - Cubic Spline

  1. #1
    Member
    Joined
    Sep 2008
    Posts
    76

    Cubic Spline

    I need some help with this Q.

    Determine all the values of a, b, c, d, e such that the following function is a cubic spline:

    f(x) = a[(x-2)^2] + b[(x-1)^3] for x in (-infi, 1]
    c[(x-2)^2] for x in [1,3]
    d[(x-2)^2] + e[(x-3)^2] for xin [3, infi)

    Please Please help!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    What ideas have you had so far?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Sep 2008
    Posts
    76
    well, I am really stuck. I can't even tell how many equations do we need to solve this problem. I mean, I think we know there are 3 intervals and each interval might have several interpolating points and if we have several interpolating points, it's kinda hard to tell the number of equations required to solve the unknowns. But considering we have 2 unknowns in the first polynomial-namely, a and b, I think we might need 2 equations? I really dont get it
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Senior Member
    Joined
    Mar 2009
    Posts
    378
    Well, cubic splines have certain properties namely
    1. They are continuous
    2. The first derivatives are continuous
    3. The second derivatives are continuous
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Sep 2008
    Posts
    76
    Thanks. Actually I know abt all the properties of the cubic spline. But I am having some problem interpreting the Intervals in this case and coming up with a reasonable estimate for the number of equations required to solvef ro all the cofficients. I was wondering if someone could get me started on this one, I'll really appreciate that.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    There are five unknowns, a through e. I would think five equations would be appropriate. Continuity gives you two equations, continuity of first derivatives gives you two more, and continuity of second derivatives gives you two more. That's six. I would regard the extra equation as a consistency check (i.e., just make sure it holds). Follow?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Sep 2008
    Posts
    76
    Thanks, trying.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Member
    Joined
    Sep 2008
    Posts
    76
    So from the continuity of the function, I get:

    a = c
    c = d

    From the continuity of the first derivative I get:

    a = c
    c = d

    and from the continuity o the second derivative I get:
    c = d+ e
    2a + 3b = 2c

    so, in this 2 of the equations are same. How should I go about the fifth? Does this look right?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    I agree with all your equations except

    2a + 3b = 2c

    for the second derivative. There's still an (x-1) term in the first region, because it's raised to the third power in the original function. Right?
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Member
    Joined
    Sep 2008
    Posts
    76
    right, having fixed that I still get 2a + 3b(x-1) = 2c at x=1
    which gives me 2a = 2c, a=c

    so basically i end up with 3 equations

    Then I applied "not-a-knot" condition at the first and last interior points wherein i get 3b = 0 this implies b =0. How shd I get the 5th equation?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    What is the not-a-knot condition?
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Member
    Joined
    Sep 2008
    Posts
    76
    http://www.me.gatech.edu/~aferri/me2...bic_spline.pdf

    Here, to find the other equations, we can use "not-a-knot"a nd natural spline conditions?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    5
    Awards
    2
    Ah, thanks for the link. Good explanation there. You would use either the not-a-knot condition or the natural spline condition, but not both, I think. You might end up with contradictions if you impose them all. I agree with b = 0 from the not-a-knot condition.

    Just going back to the OP, you might not need to nail down all the parameters. If you have the relationships between them, you might have infinitely many ways to make the function a spline.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Member
    Joined
    Sep 2008
    Posts
    76
    so, the second part of the Q says: find parameters so that the spine interpolates:

    x 0 1 4

    y 26 7 25

    (use the results of the previous problem to go abt it.

    so basiclaly i have to use what i got from the above problem. it says find the parameters? Do I need to construct the spline here? How should I go about this one?

    Please help!
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Senior Member
    Joined
    Mar 2009
    Posts
    378
    Now you can use your conditions and the original spline with these points to determine the actual values of the coefficients. Basically the spline has to satisfy those points, thus you have three more equations, i.e f(0) = 26, f(1) = 7, and f(4) = 25. This will give you the coefficient values.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Cubic Spline URGENT help!
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: October 24th 2010, 02:47 PM
  2. Clamped Cubic Spline
    Posted in the Calculus Forum
    Replies: 1
    Last Post: March 26th 2010, 06:07 AM
  3. Cubic Spline
    Posted in the Advanced Math Topics Forum
    Replies: 8
    Last Post: January 29th 2010, 08:07 PM
  4. Cubic Spline Function
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: October 22nd 2009, 05:31 AM
  5. How does one use Cubic Spline Interpolation?
    Posted in the Calculus Forum
    Replies: 7
    Last Post: May 23rd 2008, 02:42 PM

Search Tags


/mathhelpforum @mathhelpforum