# Homework Help: Cubic spline question

1. Jun 27, 2010

### nhrock3

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. Jun 27, 2010

### HallsofIvy

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.

3. Jun 27, 2010

### nhrock3

the question said to find the aproximation of the function in that integral
$$\int_{0}^{\pi/2}\sin(x^2)$$

4. Jun 27, 2010

### nhrock3

and i dont have a table of points

how am i supposed to do spline without points

5. Jun 27, 2010

### nhrock3

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

6. Jun 27, 2010

### HallsofIvy

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.

7. Jun 27, 2010

### nhrock3

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
?

8. Jun 27, 2010

### LCKurtz

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?

9. Dec 22, 2010