314 problem 2 the system 6413 may be written in a

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

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

Unformatted text preview: = ; 38 2 + qi;1=2 h 2p i q = 34 2 ; 3;1=2 + i;1=2 h h 6 0 =2 3 i i = 1 2 ::: N =2 3 (6.4.14c) i = 1 2 : : : N: (6.4.14d) i = 1 2 ::: N 2pi q = 34 2 + 3;1=2 + i;1=2 h h 6 (6.4.14b) N +1 As a simple numerical example, let's suppose p = 0, q = ;1, r = 0, A = 0, and B = 1. This is the problem of Example 6.3.2 which has the exact solution y(x) = sinh x : sinh 1 Solution and pointwise (at xi , i = 0 1 : : : N ) error data are presented in Table 6.4.1 for N = 10. The maximum pointwise errors for collocation solutions computed with 38 i xi Y (xi) y(xi) ; Y (xi) 0 0.0 0.0000000 0.0000000E+00 1 0.1 0.0852282 0.5491078E-05 2 0.2 0.1713098 0.1069903E-04 3 0.3 0.2591066 0.1528859E-04 4 0.4 0.3494977 0.1892447E-04 5 0.5 0.4433881 0.2130866E-04 6 0.6 0.5417180 0.2211332E-04 7 0.7 0.6454719 0.2080202E-04 8 0.8 0.7556885 0.1698732E-04 9 0.9 0.8734714 0.1043081E-04 10 1.0 1.0000000 0.2384186E-06 Table 6.4.1: Solution and pointwise errors for Example 6.4.1 using collocation with piecewise quadratic splines at the center of each of ten subintervals. N kY ; yk1 N 2 kY ; yk1 5 0:8890263 10;4 0.002223 10 0:2214184 10;4 0.002214 20 0:5537689 10;5 0.002215 Table 6.4.2: Maximum pointwise errors for the solution of Example 6.4.1 using collocation with piecewise quadratic splines at the center of each of N subintervals. N = 5 10, and 20 subintervals are presented in Table 6.4.2. Solutions appear to be converging as O(h2). Pointwise errors are about half of those found using central nite di erences (Table 6.3.1). Example 6.4.2. In the previous example, it seemed natural to place the single collocation point at the center of each subinterval. Were we to used piecewise cubic Hermite approximations, however, we would have two collocation points per subinterval. Placing them at the ends of each subinterval is one possibility however, our work with implicit Runge-Kutta methods (Section 3.3) would suggest that the Gauss-Legendre points give a higher rate of convergence. DeBoor and Swartz 2] showed that this is the case and we will repeat this analysis in Chapter 9 however, for the moment, let us assume it so and consider the collocation solution of ( 1], Chapter 5) 0 8 0<x<1 y00 + y = ( 8 ; x2 )2 x y0(0) = y(1) = 0 39 N jjY ; yjj1 2 0:20 10;3 5 0:64 10;5 10 0:46 10;6 20 0:33 10;7 40 0:23 10;8 80 0:16 10;9 Table 6.4.3: Maximum pointwise errors for the solution of Example 6.4.2 using collocation with piecewise cubic Hermite polynomials at two Gauss-Legendre points per subinterval. which has the exact solution 7 y(x) = 2 ln( 8 ; x2 ): The solution is smooth on 0 x 1, but the coe cient p(x) = 1=x is unbounded at x = 0. This would lead to problems with nite di erence or shooting methods, but not with collocation methods that collocate at points other than subinterval ends. Ascher et al. 1] solve this problem by a variety of techniques. We'll report their results using piecewise cubic Hermite polynomials with collocation at the two Gauss-Legendre points 1 1 h h i 2 = (xi;1 + xi ) + p ] i 1 = (xi;1 + xi ) ; p ] 2 2 3 3 per subinterval. The maximum pointwise errors are presented in Table 6.4.3. A simple calculation veri es that the solution is converging as O(N ;4). Problems 1. Construct the basis for a cubic spline approximation that is of class C 2 and has support on xi;2 xi+2 ] by integrating the quadratic splines 2 (x) and 2+1(x) of i i (6.4.6) and imposing appropriate normalization and compact support conditions. For simplicity, assume that the mesh is uniform with spacing h. 2. Using (6.4.7c) show that 2 Y (xi ) = 3 (ci + ci+1) on a uniform mesh of spacing h. Use this to rewrite the quadratic-spline collocation equations (6.4.13) in terms of Y (xi), i = 1 2 : : : N , instead of ci, i = 0 1 : : : N + 1. Compare the results with the nite di erence equations (6.3.14). 40 Bibliography 1] U.M. Ascher, R. Mattheij, and R. Russell. Numerical Solution of Boundary Value Problems for Ordinary Di erential Equations. SIAM, Philadelphia, second edition, 1995. 2] C. de Boor and B. Swartz. Collocation at gaussian points. SIAM J. Numer. Anal., 10:582{687, 1973. 3] C. deBoor. A Practical Guide to Splices. Springer-Verlag, Berlin, 1978. 41...
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