1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Cubic spline question

  1. Jun 27, 2010 #1
    find the cubic spine of
    f(x)=sin(x^2)

    i have two formulas
    one for the M's
    the other for the sums S_i

    but i need a table of points
    to know what indexes to put and when
    here i don have
    it?
     
  2. jcsd
  3. Jun 27, 2010 #2

    HallsofIvy

    User Avatar
    Science Advisor

    Your question is incomplete. The is no such thing as "the" cubic spline for a function. A cubic spline is an approximation to the function and different cubic splines will give different approximations. For what interval are you to find a cubic spline approximation for this function? Since this function is not periodic, there is no (finite) cubic spline that will accurately approximate it for all x. Are you given specific "knots" (points at which the cubic "pieces" meet)? If not you can select them yourself but there are an infinite number of different "correct" answers depending upon that selection.
     
  4. Jun 27, 2010 #3
    the question said to find the aproximation of the function in that integral
    [tex]\int_{0}^{\pi/2}\sin(x^2)[/tex]
     
  5. Jun 27, 2010 #4
    and i dont have a table of points

    how am i supposed to do spline without points
     
  6. Jun 27, 2010 #5
    in the solution i was told that i could find M1 and from it S1

    but why there only M1
    why not also M2 M3
    which will give us S2 S3

    each S_i represents subunterval
     
  7. Jun 27, 2010 #6

    HallsofIvy

    User Avatar
    Science Advisor

    Once again, there is no such thing as "the" approximation to any thing. There are many different approximations with accuracy depending on what method you use and how much work you want to do. If you are asked to approximate that integral, using a cubic spline, and no other information is given, then you are free to decide for yourself what interpolation points and knots to use and how many you want to use.
     
  8. Jun 27, 2010 #7
    so if i will deside to use 4 points or 7 points
    f(x1)=y1 etc..
    and i deside wich are xi's

    i will get the same quadratic polinomial
    ?
     
  9. Jun 27, 2010 #8

    LCKurtz

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    No, you won't. Here you are talking about a quadratic polynomial approximation, such as used in Simpson's rule for evaluating integrals, and the title of the thread asks for a cubic spline. Which is it? They aren't the same thing. Are you really just asking about Simpson's rule or something else?
     
  10. Dec 22, 2010 #9
    i need to know how could we solve any differential equation using the concept of splines ???
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook