# 47c i cn hn if i n hn hn 1 one could take h0 h1 and

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ach end of the domain and write Y (x) as N +1 X Y (x) = ci 2(x): (6.4.8) i i=0 Now there are three nonzero basis elements on every subinterval. For interpolation problems, the coe cients ci, i = 0 1 : : : N + 1, may be determined by satisfying Y (xi;1 =2) = f (xi;1 =2) i = 1 2 : : : N: This yields N equations for the N + 2 unknowns. The extra two equations could be obtained by interpolating f (x) at x0 and xN , 34 prescribing f 0(x) at x0 and xN , or prescribing Y 0 (x0) = Y 0(xN ) = 0. Regardless of the boundary prescription, this interpolation problem requires the solution of a tridiagonal linear algebraic problem to determine ci, i = 0 1 : : : N + 1. It's possible to continue in this manner, introducing more continuity with increasing polynomial degree however, usually we'll want approximations having the minimum allowable continuity. Since higher-degree approximations increase the convergence rate of smooth solutions, we seek alternative spline constructions that do not increase smoothness with increasing polynomial degree. Such procedures exist 3] however, for the moment, we'll examine piecewise cubic Hermite approximation. Thus, let us consider a function of the form N X3 Y (x) = ci i (x) + di!i3(x)]: (6.4.9) i=0 The basis f 3(x) !i3(x)gN is constructed to satisfy the following conditions: i i=0 1. 3 i (x) and !i3(x) are piecewise cubic polynomials on (x0 xN ), 2. 3 i (x) !i3(x) 2 C 1(x0 xN ), 3. 3 i (x) and !i3(x) are nonzero only on xi;1 xi+1 ), and 4. 3 i (xi ) = 1 and !i3(xi ) = 0, i = 0 1 : : : N . These conditions imply that i (xj ) = ij 3 !i3(xj ) = 0 03 i (xj ) = 0 !i03(xj ) = ij i j = 0 1 ::: N (6.4.10a) i j = 0 1 : : : N: (6.4.10b) Together, (6.4.9) and (6.4.10) give Y (xi ) = ci and Y 0(xi ) = di, i = 0 1 : : : N . Given these requirements, the piecewise cubic Hermite basis is 8 < 1 ; 3( x;ixi )2 ; 2( x;ixi )3 if xi;1 x < xi h h x x 3 (6.4.11a) (x) = : 1 ; 3( x;+1i )2 + 2( x;+1i )3 if xi x < xi+1 i hi hi 0 otherwise 35 1.2 1 0.8 0.6 0.4 0.2 0 −0.2 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 Figure 6.4.5: Cubic Hermite polynomial basis elements 3(x) (solid) and !i3(x) (dashed) i relative to a mesh with xi;1 = ;1, xi = 0, and xi+1 = 1. 8 < (x ; xi ) 1 + x;ixi ]2 if xi;1 x < xi h x (6.4.11b) !i3(x) = : (x ; xi ) 1 ; x;+1i ]2 if xi x < xi+1 : hi 0 otherwise Representative basis elements are illustrated in Figure 6.4.5. Examining (6.4.9), we see that there are four nontrivial basis elements i;1, !i;1, i, and !i on the subinterval (xi;1 xi), i = 1 2 : : : N . Having constructed appropriate piecewise polynomial approximations, let us use them to de ne a collocation method by satisfying (6.3.1) at a prescribed number of points per subinterval and (typically) satisfying the boundary conditions. Thus, Y 00( ij ) = f ( ij Y ( ij ) Y 0 ( ij )) j = 1 2 ::: J Y (a) = A Y (b) = B: i = 1 2 ::: N (6.4.12a) (6.4.12b) As indicated, there are J collocation points ij , j = 1 2 : : : J , per subinterval. For the piecewise quadratic spline approximation (6.4.8), we would determine the N + 2 unknowns ci, i = 0 1 : : : N , by collocating at J = 1 point per subinterval and satisfying the boundary conditions (6.4.12b). With the piecewise cubic Hermite polynomial (6.4.9), 36 we would determine the 2(N +1) unknowns ci di, i = 0 1 : : : N , by collocating at J = 2 point per subinterval and satisfying (6.4.12b). Example 6.4.1. We'll develop the collocation equations when piecewise quadratic splines (6.4.8) are applied to a linear problem with f (x y y0) given by (6.3.13). For simplicity, we'll assume that the mesh is uniform with spacing h. Utilizing (6.4.6) and (6.4.8), the boundary conditions (6.4.12b) are 2 Y (a) = A = 3 (c0 + c1) Y (b) = B = 2 (cN + cN +1): 3 (6.4.13a) Selecting the sole collocation point i1 = xi;1=2 = xi;12+ xi i = 1 2 ::: N at the center of each subinterval (Figure 6.4.6) and using (6.4.6) and (6.4.8) we have 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Figure 6.4.6: Piecewise quadratic spline basis used for collocation on a mesh with spacing h = 0:2 on 0 1]. 1 Y (xi;1=2 ) = 6 (ci;1 + 6ci + ci+1 ) 37 Y 0(xi;1=2 ) = 32h (ci+1 ; ci;1 ) and Y 00(xi;1=2 ) = 34 2 (ci;1 ; 2ci + ci+1): h Substituting these results into (6.4.12a) while using (6.3.13), we nd 4 (c ; 2c + c ) + 2pi;1=2 (c ; c ) + qi;1=2 (c + 6c + c ) = r i i+1 i i+1 i;1=2 3h2 i;1 3h i+1 i;1 6 i;1 i = 1 2 : : : N: (6.4.13b) These di erence equations are similar, but not identical, to the central nite di erence equations (6.3.14). The relationship can be made more precise by re-writing (6.4.13) in terms of the nodal unknowns Y (xi ) and comparing this result with (6.3.14) (Problem 2). The system (6.4.13) may be written in a tridiagonal form as 2 32 32 3 c0 A 0 0 61 1 1 7 6 c1 7 6 r1 7 6 76 6 76 . 7 = 6 . 7 ... ... ... (6.4.14a) 6 76 . 7 6 . 7 6 76 . 7 6 . 7 76 7 4 N N N 5 4 cN 5 4 rN 5 cN +1 B N +1 N +1 where 0 i = N +1 =2 3 i...
View Full Document

## This document was uploaded on 03/16/2014 for the course CSCI 6820 at Rensselaer Polytechnic Institute.

Ask a homework question - tutors are online