Results 1 to 4 of 4

Math Help - Need help interpolating polynomials (spline)?

  1. #1
    Junior Member
    Joined
    Jun 2008
    Posts
    53

    Need help interpolating polynomials (spline)?

    Consider the data points: (0,1), (1,1), (2,5)

    a) Find the piecewise linear interpolationg functon for the data

    b) Find the quadratic interpolating

    c) Find the natural cubic spline that interpolates the data..

    ---

    I can do part b) , but in a) how do you do a piecewise? And if someone could do c) out entirerly & explain I'd really appreciate it.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,829
    Thanks
    123
    Quote Originally Posted by amor_vincit_omnia View Post
    Consider the data points: (0,1), (1,1), (2,5)

    a) Find the piecewise linear interpolationg functon for the data

    b) Find the quadratic interpolating

    c) Find the natural cubic spline that interpolates the data..

    ---

    I can do part b) , but in a) how do you do a piecewise? And if someone could do c) out entirerly & explain I'd really appreciate it.
    to a)

    f(x)= \left\{\begin{array}{lcr}x & if & 0\leq x<1 \\ 4x-3 & if & 1 \leq x \leq 2 \end{array} \right.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,829
    Thanks
    123
    Quote Originally Posted by amor_vincit_omnia View Post
    Consider the data points: (0,1), (1,1), (2,5)

    ...

    c) Find the natural cubic spline that interpolates the data..

    ...
    The general equation of the function you are looking for is

    f(x)=ax^3+bx^2+cx+d

    What you already know:

    f(0)=1
    f(1)=1
    f(2)=5
    Now use the condition
    f''(0) = 0 or
    f''(2) = 0

    I don't know which method you have learned in school.

    Now you have a system of simultaneous equations which will give you the values of a, b, c and d.
    Attached Thumbnails Attached Thumbnails Need help interpolating polynomials (spline)?-spline3pts.png  
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Jun 2008
    Posts
    53
    Well, we didn't learn a certain method for spline, but it is in the homework. If you know a method, I would appreciate it.
    When I used the three conditions,
    f(0)=1
    f(1)=1
    f(2)=5

    &

    f''(0) = 0 ,

    I got a = 2/3, b = 0, c = -2/3, d = 1

    f(x) = 2/3x^3 - 2/3x + 1

    But the answer is:

    f(x) =

    x^3 - x + 1 for 0<=x<=1
    (2-x)^3 + (4x-3) - (2-x) for 1<=x<=2


    Any idea?
    Last edited by amor_vincit_omnia; September 30th 2008 at 05:44 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. interpolating polynomial for sin(pi*x)
    Posted in the Differential Geometry Forum
    Replies: 0
    Last Post: December 7th 2011, 07:46 PM
  2. interpolating on logarithmic graphs
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: September 18th 2010, 03:31 AM
  3. Simplest Interpolating Polynomial
    Posted in the Advanced Applied Math Forum
    Replies: 0
    Last Post: April 11th 2010, 02:25 AM
  4. Lagrange interpolating polynomials
    Posted in the Calculus Forum
    Replies: 2
    Last Post: February 3rd 2009, 04:48 AM
  5. Hermite interpolating polynomial?
    Posted in the Advanced Algebra Forum
    Replies: 3
    Last Post: April 27th 2006, 08:53 PM

Search Tags


/mathhelpforum @mathhelpforum