Mmaths
Mmaths
UNIT-2
CUBIC SPLINES
on an interval [a,b] composed of k ordered disjoint sub-intervals [ti-1,ti] with a = t0< t1<. . .< t k-1<tk = b.
Order of a Spline
The highest order of the polynomials Pi(t) is said to be the order of the spline S.
Important Points
1.Calculation of M values.
Problem-1 Question
i
xi yi
0
1 1
1
2 5
2
3 11
3
4 8
End Conditions:y0''=y3''=0.
Problem-1 Solution
To find:1.The Cubic Spline for y=f(x). 2.Compute y(1.5). 3.Compute y'(2).
Problem-1 Solution
Equations for M terms:-
For i=1,
the equation is 4M1+M2= 12. For i=2,
Problem-1 Solution
The final answer is:-
3 2 f1(x) = (1/15) [ 17x -51x +94x-45] 3 2 f2(x) = (1/15) [-55x + 381x -770x+531] 3 2 f3(x)= (1/15) [38x -456x + 1741x-1980]
Problem-1 Solution
Deductions:-
(1) y(1.5):As 1.5 lies in [1,2] take f1(x) and put x=1.5 to get the answer as 2.575. (2)y'(2):As 2 lies in [1,2] take f1(x), differentiate it and put x=2 to get the answer as 6.267.
Problem-1 Solution
Deductions:-
(1) y(1.5):As 1.5 lies in [1,2] take f1(x) and put x=1.5 to get the answer as 2.575. (2)y'(2):As 2 lies in [1,2] take f1(x), differentiate it and put x=2 to get the answer as 6.267.
University Questions
Fit a natural cubic spline for the following data
Problem-1:- (year-2006) x: 0 1 2 3
Y : 1 4 0 -2
Problem-2:- (year-2007) X: 1 2 3 4 Y: 0.5 0.3333 0.25 0.2 and find f(2.5).
University Questions
1. Define splines and Cubic splines.
THANK YOU!!!!