We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
• Home
• Student Help
• Generate eight equally-spaced points from the function f (t) ˘ sin2 t from t ˘ 0 to t ˘ 2…. Fit this data with 2. a cubic polynomial
la
updated 28 days ago

# Generate eight equally-spaced points from the function f (t) ˘ sin2 t from t ˘ 0 to t ˘ 2…. Fit this data with 2. a cubic polynomial

Find sample essays on related topics:
ja
updated 28 days ago

Before solving the task, it is beneficial to read through the theory.

A spline is a smooth (that is a function which has derivatives of each order for all values in a domain of definition) function which constructed on a particular set of points. A cubic spline is a spline that is defined on a base of third-order polynomials.

The cubic splines are useful for interpolating and for generating an equally-spaced set of nodes as in the example.

Step 1

Find eight equally-spaced points on [0; 2pi] using formula:

xi = a + i(b-a)/n-1, where a = 0, b = 2pi, n = 8 and i is changing from 0 to (n-1).

Step 2

Construct a cubic spline through the calculated values.

You will have a system of seven third-order polynomials like this:

Si = ai + bi(x - xi) + ci(x-xi)2 + di(x-xi)3 in the interval [xi-1;xi]

Step 3

Find the coefficients ai, bi, ci, di.