Lecture24 - 1 Engineering Analysis ENG 3420 Fall 2009 Dan...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: 1 Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00 2 2 Lecture 24 Lecture 24 Attention: The last homework HW5 and the last project are due on Tuesday November 24!! Last time: Lagrange interpolating polynomials Splines Today Cubic splines Searching and sorting Numerical integration (chapter 17) Next Time Numerical integration 3 Cubic splines Cubic splines the simplest representation with the appearance of smoothness and without the problems of higher order polynomials. Linear splines have discontinuous first derivatives Quadratic splines have discontinuous second derivatives and require setting the second derivative at some point to a pre-determined value Quartic or higher-order splines tend to exhibit ill-conditioning or oscillations. The cubic spline function for the i th interval can be written as: For n data points, there are ( n-1) intervals and thus 4( n-1) unknowns to evaluate to solve all the spline function coefficients. s i x ( 29 = a i + b i x- x i ( 29 + c i x- x i ( 29 2 + d i x- x i ( 29 3 4 Conditions to determine the spline coefficients The first condition the spline function goes through the first and last point of the interval ; this leads to 2(n-1) equations: The second condition the first derivative should be continuous at each interior point ; this leads to (n-2) equations: The third condition the second derivative should be continuous at each interior point ; this leads to (n-2) equations: So far we have (4n-6) equations; we need (4n-4) equations! s i x i ( 29 = f i a i = f i s i x i + 1 ( 29 = f i s i x i + 1 ( 29 = a i + b i x i + 1- x i ( 29 + c i x i + 1- x i ( 29 2 + d i x i + 1- x i ( 29 3 = f i s i ' x i + 1 ( 29 = s i + 1 ' x i + 1 ( 29 b i + 2 c i x i + 1- x i ( 29 + 3 d i x i + 1- x i ( 29 2 = b i + 1 s i '' x i + 1 ( 29 = s i + 1 '' x i + 1 ( 29 2 c i + 6 d i x i + 1- x i ( 29 = 2 c i + 1 5 Two additional equations There are several options for the final two equations: Natural end conditions the second derivative at the end knots are zero. Clamped end conditions the first derivatives at the first and last knots are known. Not-a-knot end conditions force continuity of the third derivative at the second and penultimate points (results in the first two intervals having the same spline function and the last two intervals having the same spline function) 6 Built-in functions for piecewise interpolation MATLAB has several built-in functions to implement piecewise interpolation. spline yy=spline(x, y, xx) Performs cubic spline interpolation, generally using not-a-knot conditions....
View Full Document

This note was uploaded on 02/17/2012 for the course EGN 3420 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 31

Lecture24 - 1 Engineering Analysis ENG 3420 Fall 2009 Dan...

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

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