University of Houston, Deprtment of Mtemtics Numericl Anlysis II 6 Glerkin metod, finite differences nd colloction 6.1 Glerkin metod Consider sclr 2nd order ordinry differentil eqution in selfdjoint form wit omogeneous boundry conditions: were r,s C(I), I := [,b] nd ( ) 1 (r(x) y (x)) + s(x) y(x) = f(x), x [,b], ( ) 2 y() = 0, y(b) = 0, 0 < c 0 r(x) c 1, x I, s(x) 0, x I. Sclr multipliction of ( ) 1 by function ϕ C 1 0(I) nd integrtion over I yields (r(x) y (x)) ϕ(x) dx + Prtil integrtion of te first integrl results in (r(x) y (x)) ϕ(x) dx = s(x) y(x) ϕ(x) dx = f(x) ϕ(x) dx. r(x) y (x) ϕ (x) dx (r(x) y (x)ϕ(x)) b }{{} = 0.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II We tus obtin r(x) y (x) ϕ (x) dx + s(x) y(x) ϕ(x) dx = f(x)ϕ(x) dx. In view of te preceding eqution, we introduce norm on C 1 0(I) ccording to y 1 := ( (y (x) 2 + y(x) 2 ) dx ) 1/2. Te spce (C 1 0(I), 1 is not complete. We denote by H 1 0(I) te completion of (C 1 0(I), 1 ) wit respect to te topology defined by 1 on C 1 1(I). Ten, te vritionl eqution ( ) r(x) y (x) ϕ (x) dx + s unique solution y H 1 0(I). s(x) y(x) ϕ(x) dx = f(x)ϕ(x) dx, ϕ H 1 0(I) We coose subspce S H 1 0(I) wit dim S = n < nd compute n pproximtion y S s te solution of te finite dimensionl vritionl eqution ( ) b r(x) y (x) ϕ (x) dx + s(x) y (x) ϕ (x) dx = f(x)ϕ (x) dx, ϕ S.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II We coose S H 1 0(I) s te liner subspce S 1,0 (I;I ) of liner splines wit respect to prtition I of te intervl I := [,b]: I := { x k := + k 0 k n + 1 }, := b n + 1, S 1,0 (I;I ) := { v C 0 (I) v [xk,x k+1 ] P 1 ([x k,x k+1 ]), 0 k n }. Te spce S 1,0 (I;I ) is spnned by te bsis functions ϕ (k), 1 k n, s given by ϕ (k) (x j ) = δ jk, 1 j,k n, i.e., S 1,0 (I;I ) = spn {ϕ (1),..., ϕ (n) }. Te solution y S 1,0 (I;I ) cn be written s liner combintion of te bsis functions y = n c j ϕ (j). Ten, ( ) olds true if nd only if n [ r(x) (ϕ (j) ) (x) (ϕ (i) ) (x) dx + j=1 }{{} j=1 s(x) (ϕ (j) )(x) (ϕ (i) )(x) dx] c j = =: ij f(x) (ϕ (i) )(x) dx, 1 i n. =: b i }{{}
University of Houston, Deprtment of Mtemtics Numericl Anlysis II ( ) represents liner lgebric system Ac = b. Definition 6.1 Stiffness mtrix nd lod vector Te mtrix A = ( ij ) n i,j=1 nd te vector b = (b 1,...,b n ) T re referred to s te stiffness mtrix resp. te lod vector. Lemm 6.2 Properties of te stiffness mtrix Te stiffness mtrix A is symmetric, positive definite tridigonl mtrix. Lemm 6.3 Numericl qudrture If we compute te entries of te stiffness mtrix nd te components of te lod vector by te qudrture formul b g(x) dx g(x k + 2 ) =: g k+1/2, we obtin ii = r k 1/2 i,i+1 = r k+1/2 + r k+1/2 b i = 2 f k 1/2 + 2 f k 1/2. + 4 s k 1/2 + 4 s k+1/2, 1 i n, + 4 s k+1/2, 1 i n 1, i 1,i = r k 1/2 + 4 s k 1/2, 2 i n,
University of Houston, Deprtment of Mtemtics Numericl Anlysis II 6.2 Finite difference metods Introducing te vrible z(x) := r(x) y (x), x I, te 2nd order ordinry differentil eqution ( ) 1 is equivlent to system of two differentil equtions of 1st order ( ) 1 y (x) = z(x)/r(x), x I, ( ) 2 z (x) = s(x) y(x) f(x), x I. We prtition te intervl I := [,b] into te equidistnt grid I := { x k = + k 0 k n + 1 } of step size := (b )/(n + 1) nd pproximte te first derivtives y (x) nd z (x) wit respect to x k+1/2 = x k + /2, 0 k n, by te 1st order centrl difference quotients 1 (y(x k+1) y(x k )) z(x k+1/2) r(x k+1/2 ), 1 (z(x k+1) z(x k )) s(x k+1/2 ) y(x k+1/2 ) f(x k+1/2 ).
University of Houston, Deprtment of Mtemtics Numericl Anlysis II Since we wnt to compute pproximtions only in te nodes x k, 0 k n + 1, we replce z(x k+1 / 2 ) nd y(x k+1 / 2 ) by verging: z(x k+1/2 ) 1 2 (z(x k) + z(x k+1 )), y(x k+1/2 ) 1 2 (y(x k) + y(x k+1 )). Moreover, for nottionl convenience we set r k+1/2 := r(x k+1/2 ), s k+1/2 := s(x k+1/2 ), f k+1/2 := f(x k+1/2 ). Ten, te finite difference metod is s follows: Compute grid functions y,z C(I ) s te solution of ( ) 1 y (x k+1 ) = y (x k ) + (z (x k ) + z (x k+1 )), 0 k n, 2 r k+1/2 ( ) 2 z (x k+1 ) = z (x k ) + 2 (y (x k ) + y (x k+1 )), 0 k n, ( ) 3 y () = y (b) = 0.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II Solving ( ) 2 for z (x k+1 ) gives ( ) 4 z(x k+1 ) = z (x k ) + 2 r k+1/2 (y (x k+1 ) y (x k )). Te corresponding eqution for z (x k ) is given by ( ) 5 z(x k ) = z (x k 1 ) + 2 r k 1/2 (y (x k ) y (x k 1 )). Inserting ( ) 5 into ( ) 4 yields ( ) 6 z (x k+1 ) z (x k 1 ) = 2 r k 1/2 (y (x k ) y (x k 1 )) + 2 r k+1/2 (y (x k+1 ) y (x k )). On te oter nd, dding ( ) 2 for k 1 nd k gives ( ) 7 z (x k ) = z (x k 1 ) + 2 s k 1/2 (y (x k 1 ) + y (x k )) f k 1/2 / + ( ) 7b z (x k+1 ) = z (x k ) + 2 s k+1/2 (y (x k ) + y (x k+1 )) f k+1/2 = ( ) 8 2 s k 1/2 y (x k 1 ) + 2 (s k 1/2 + s k+1/2 ) y (x k ) + 2 s k+1/2 y (x k+1 ) (z (x k+1 ) z (x k 1 )) = = f k 1/2 + f k+1/2.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II Inserting ( ) 6 into ( ) 8, we obtin ( ) 9 ( 2 r k 1/2 + ( 2 r k+1/2 + 2 s k 1/2) y (x k 1 ) + ( 2 r k 1/2 + 2 r k+1/2 + 2 s k+1/2) y (x k+1 ) = (f k 1/2 + f k+1/2 ). + 2 s k 1/2) + 2 s k+1/2) y (x k ) + A comprison of ( ) 9 nd Lemm 6.3 sows: Te Glerkin metod wit numericl qudrture is equivlent to te finite difference metod developed in tis subsection.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II 6.3 Colloction We consider te boundry vlue problem ( ) 1 (r(x) y (x)) + s(x) y(x) = f(x), x [,b], ( ) 2 y() = y(b) = 0 under te sme ssumptions on r,s s in Cpter 6.1. As for te Glerkin metod, we re looking for n pproximtion in finite dimensionl spce V n = spn {ϕ 0,..., ϕ n+1 }, i.e., we use te nstz ( ) y n (x) = n+1 j=0 c j ϕ j (x). Ide: Assume tt te function given by ( ) stisfies te two boundry conditions ( ) 2 s well s te differentil eqution in n prespecified points ξ i (,b), 1 i n, wic re clled colloction points. Remrk 6.4 We require te continuity of te functions ϕ i,0 i n + 1, nd its derivtives up to second order in te colloction points.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II Colloction metods re clssified ccording to te nture of te nstz functions: (i) Polynomil colloction (spectrl metod) Use of globl polynomils s nstz functions (ii) Spline colloction Use of splines of order m 3 wit respect to prtition n of [,b]. (i) Polynomil colloction Te nstz functions ϕ i re cosen s te ortogonl polynomils of degree i + 1, 1 i n, wit respect to te inner product (y 1,y 2 ) 0,I := b y 1(x)y 2 (x)dx stisfying ϕ() = ϕ(b) = 0. Te colloction points re cosen s te zeroes < ξ 1 < ξ 2 <... < ξ n < b of ϕ n+1. Remrk 6.5 A disdvntge of polynomil colloction is tt te resulting liner lgebric system s densely populted coefficient mtrix.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II (ii) Spline colloction Te nstz functions re cosen s te splines s 3, n S 3, n (I) of order 3 wit respect to n equidistnt prtition n := { x i = + i 0 i n }, := b n of I wit dim S 3, n (I) = n + 2. Te bsis is cosen using qudrtic B-splines: B (i) 2 (x) = wit x := x i 1 + 2. 1 2 (3 2 + 1 (x x )) 2, x [x i 2,x i 1 ] ( 3 4 1 (x x )) 2, x [x i i,x i ] 1 2 (3 2 1 (x x )) 2, x [x i,x i+1 ] Remrk 6.6 Since te nstz functions re only C 1 -functions, te colloction points must not coincide wit te interior nodes. Terefore, we coose: ξ 0 =, ξ i = 1 2 (x i 1 + x i ), 1 i n, ξ n+1 = b.
University of Houston, Deprtment of Mtemtics Numericl Anlysis II Remrk 6.7: Te colloction conditions in te boundry nodes x 0 = nd x n+1 = b re stisfied utomticlly, if te B-splines B (0) 2 nd B (n+1) 2 wit treefold nodes in x 0 nd x n+1 re eliminted from te bsis. Tis leds to te nstz ( ) y n (x) = n j=1 c j ϕ (j) (x). Lemm 6.8 Properties of te resulting coefficient mtrix Te nstz ( ) gives rise to liner lgebric system Ac = b wit symmetric, positive definite tridigonl mtrix A lr n n. Proof: Every colloction point ξ i is situted witin te support of t most tree B-spline bsis functions.