This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 1 Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: TuTh 11:0012: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 predetermined value Quartic or higherorder splines tend to exhibit illconditioning or oscillations. The cubic spline function for the i th interval can be written as: For n data points, there are ( n1) intervals and thus 4( n1) 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(n1) equations: The second condition the first derivative should be continuous at each interior point ; this leads to (n2) equations: The third condition the second derivative should be continuous at each interior point ; this leads to (n2) equations: So far we have (4n6) equations; we need (4n4) 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. Notaknot 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 Builtin functions for piecewise interpolation MATLAB has several builtin functions to implement piecewise interpolation. spline yy=spline(x, y, xx) Performs cubic spline interpolation, generally using notaknot 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.
 Spring '08
 Staff

Click to edit the document details