# 332a where the series expansion of ln1 x jxj 1 has

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: approximations of rst derivatives. For example, suppose that we retain the rst two terms in (6.3.32a), i.e., hDyi ; 1 2 ]yi 2 26 or or hDyi y (yi+1 ; yi) ; yi+2 ; 22 i+1 + yi ] Dyi ;yi+2 + 4yi+1 ; 3yi : 2h This formula can be veri ed as an O(h2) approximation of y0(xi). Example 6.3.7. Let us use (6.3.31) with h replaced by h=2 to obtain 2 y(xi;1=2 ) = e; h D y(xi): 2 y(xi+1=2 ) = e h D y(xi) Subtracting the two formulas and using the central di erence operator gives 2 2 y(xi) = (e h D ; e; h D )y(xi) = (2 sinh h D)y(xi): 2 Thus, or = 2 sinh h D 2 2 (6.3.33) hD = 2 sinh;1 2 = ; 2213! 3 + 235! 5 ; : : : 4 which can be used to construct central di erence approximations of y0(xi ). Example 6.3.8. We can square, cube, etc. relations (6.3.32) and (6.3.33) to construct approximations of second, third, etc. derivatives. For example, squaring (6.3.33) gives 1 1 (6.3.34) h2 D2y(xi) = h2y00(xi) = 2 ; 12 4 + 90 6 + : : : ]y(xi): At some point, these formal manipulations would have to be veri ed as being correct and estimates of their local discretization errors would have to be obtained. Nevertheless, using the formal operators of Table 6.3.3 provides us with a simple way of developing high-order nite di erence approximations. 6.4 Introduction to Collocation Methods Unlike nite di erence methods, projection methods such as collocation give a continuous approximation of the solution as a function of x. The basic idea is to approximate the 27 solution y(x) of a BVP by a simpler function Y (x) and then determine Y (x) so that it is the \best&quot; approximation of y(x) in some sense. Two reasonable choices for Y (x) are a discrete Fourier series M ;1 X Y (x) = ck eikx k=0 and a polynomial Y (x) = M ;1 X k=0 ck xk : It is convenient to regard the BVP solution y(x) as an element of an in nite-dimensional function space and Y (x) as an element of an M -dimensional subspace of it. Thus, assuming that y(x) has continuous second derivatives on a &lt; x &lt; b, we would write y(x) 2 C 2(a b) which is read \y(x) is an element of the space of functions that have continuous second derivatives on (a b).&quot; Then, Y (x) 2 S M C 2 (a b) where the space S M consists of those C 2 functions having a prescribed form. The chosen functions, e.g., eikx or xk , k = 0 1 : : : M ; 1, comprise a basis for S M . In order to introduce some concepts, we'll again focus on the second-order, nonlinear, scalar BVP (6.3.1). After selecting a basis, the \coordinates&quot; ck , k = 0 1 : : : M ; 1, can be determined by, e.g., the least squares technique Zb min R2 (x)dx Y 2sM a where R(x) is the residual R(x) = Y 00 ; f (x Y Y 0): In this case, it is clear that Y (x) is the \best&quot; approximation of y(x) in the sense of minimizing the square of the integral of the residual. Using Galerkin's method, we determine Y (x) so that the residual R(x) is \orthogonal&quot; to every function in S M , i.e., Zb w(x)R(x)dx = 0 8w(x) 2 S M : a The optimality of this procedure is not clear however, since Galerkin's method is primariliy used with partial di erential equations, we will not pursue it further. 28 Collocation has been shown to be a successful procedure tor two-point BVPs and is the one on which we focus. Collocation consists of satisfying R( i ) = 0 i = 1 2 ::: M with a 1 &lt; 2 &lt; : : : &lt; M b: The optimality of collocation is also not clear, but we'll pursue this elsewhere. Global approximations such as the Fourier series and the polynomials introduced above lead to ill-conditioned algebraic problems. It is far better to use piecewise polynomial approximations that result in sparse and well-conditioned algebraic systems. It is also unwise to infer more continuity than necessary. Discontinuous and continuous piecewise polynomial approximations might have the forms shown in Figure 6.4.1. The discontinuous polynomial (on the left) has jumps at xi , i = 1 2 : : : N ; 1. Thus, the rst derivative doesn't exist at these points and this would be an unsuitable function to approximate the solution of a second-order ODE. The continuous approximation (on the right) has jumps in its rst derivative at xi , i = 1 2 : : : N ; 1, and its second derivative doesn't exist at these points. Hence, minimally Y (x) 2 C 1 (a b). In this case, the rst derivative of Y (x) is continuous and the second derivative is piecewise continuous. Y(x) Y(x) x x0 x1 x xN x0 x1 xN Figure 6.4.1: Discontinuous (left) and continuous (right) piecewise polynomial function Y (x) having jumps (left) and jumps in its rst derivative (right) at xi , i = 1 2 : : : N ; 1. Perhaps the simplest way of satisfying the continuity requirements is to select a basis for S M that includes them. For example, a basis for a space of piecewise constant 29 functions could be chosen as i (x) = 0 1 if x 2 xi;1 xi) 0 otherwise i = 1 2 : : : N: (6.4.1) The approximation Y (x) would then be writte...
View Full Document

Ask a homework question - tutors are online