Lecture 34 - Piecewise Cubic Splines data points : (x 1, y1...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Piecewise Cubic Splines x 1 x 2 x 3 x n s 1 (x) 2 n-1 4 ( n - 1 ) unknowns Continuous slopes and curvatures x n-1 [ ] [ ] [ ] n 1 n 1 n 3 2 2 2 1 1 n n, 3 3, 2 2, 1 1, x x I x x I x x I interval y (x y (x y (x y (x points data , , , , , , : ) , ), ), ), : - - = = = 3 i i 2 i i i i i i x x d x x c x x b a f ) ( ) ( ) ( - + - + - + =
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Piecewise Cubic Splines x 1 x 2 x 3 x n s i (x) - piecewise cubic polynomials s i ’(x) - piecewise quadratic polynomials (slope) s i ”(x) - piecewise linear polynomials (curvatures) x n-1 s 1 (x) s 2 (x) 3 S n-1 i ’’ [ ] [ ] [ ] n 1 n 1 n 3 2 2 2 1 1 n n, 3 3, 2 2, 1 1, x x I x x I x x I interval y (x y (x y (x y (x points data , , , , , , : ) , ), ), ), : - - = = =
Background image of page 2
Cubic Splines Piecewise cubic polynomial with continuous derivatives up to order 2 1. The function must pass through all the data points gives 2(n-1) equations - + - + - + = = = = - + - + - + = = = + + + + + 3 i 1 i i 2 i 1 i i i 1 i i i i 1 i i 1 i i 3 i i i 2 i i i i i i i i i i i x x d x x c x x b a f x s x x a x x d x x c x x b a f x s x x ) ( ) ( ) ( ) ( : ) ( ) ( ) ( ) ( : 2 3 1 i i i i i i i i i i a f f b h c h d h f + = + + + = i = 1,2,…, n-1
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cubic Splines 2. First derivatives at the interior nodes must be equal: (n-2) equations 3. Second derivatives at the interior nodes must be equal: (n-2) equations 1 i 2 i i i i i 1 i 1 i 1 i i 2 i i i i i i b h d 3 h c 2 b x s x s x x d 3 x x c 2 b x s + + + + = + + = - + - + = ) ( ) ( ) ( ) ( ) ( 1 i i i i 1 i 1 i 1 i i i i i i c h d 3 c x s x s x x d 6 c 2 x s + + + + = + = - + = ) ( ) ( ) ( ) (
Background image of page 4
Cubic Splines 4. Two additional conditions are needed (arbitrary) The last two equations Total equations: 2(n-1) + (n-2) + (n-2) +2 = 4(n-1) + = = = = - - - - 1 n 1 n 1 n n 1 n 1 1 1 h d 6 c 2 0 x s c 2 0 x s ) ( ) ( = + = = = = - - - - 0 h d 3 c c 0 c 0 x s 0 x s 1 n 1 n 1 n n 1 n 1 n 1 1 ) ( ) (
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Cubic Splines 3 i i 2 i i i i i i x x d x x c x x b a x s ) ( ) ( ) ( ) ( - + - + - + = Solve for ( a i , b i , c i , d i ) – see textbook for details Tridiagonal system with boundary conditions c 1 = c n = 0 ]) , [ ] , [ ( ) ( 1 i i i 1 i 1 i 1 i i i i 1 i 1 i i i i 1 i 1 i 1 i x x f x x f 3 h f f 3 h f f 3 c h c h h 2 c h - + - - + + - - - - = - - - = + - + ( 29 1 i i i i i 1 i i i i 1 i i i i c c 2 3 h h f f b h 3 c c d f a + + + + - - = - = = , ,
Background image of page 6
Cubic Splines ( 29 ( 29 ( 29 - - - = + + + - - - - - - - - 0 x x f x x f 3 x x f x x f 3 x x f x x f 3 0 c c c
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Fall '09 term at University of Florida.

Page1 / 35

Lecture 34 - Piecewise Cubic Splines data points : (x 1, y1...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online