a galerkin approximation for the initial-value problem for linear second-order differential...

16

Click here to load reader

Upload: john-gregory

Post on 21-Jun-2016

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

John Gregory and Marvin Zeman

Department of Mathematics Southern lllinois University at Carbondule Carbondale, Illinois 62901

ABSTRACT

In this paper, a Galerkin type algorithm is given for the numerical solution of L(x)=(r(t)x’(t))‘-&t)x(t)=g(t); x(a)=r,, r’(a)=rh, where r(t)>O, and Spline hat functions form the approximating basis. Using the related quadratic form, a two-step difference equation is derived for the numerical solutions. A discrete Gronwall type lemma is then used to show that the error at the node points satisfies ek = 0(h2). If e(t) is the error function on a < t < b; it is also shown (in a variety of norms) that Ile(t)ll Q C/z2 and Ile’(t)ll < C,h. Test case nms are also included. A (one step) Richardson or Rhomberg type procedure is used to show that ef = O(h4). Thus our results are comparable to Runge-Kutta with half the function evaluations.

I. INTRODUCTION

In this paper we consider the problem of the numerical soption of

L(x) = [@)x’(t)]‘- dt)x(t) = g(t),

x(a) = xa, x’(a) = xi, 0)

which is associated with the form

Z(x, y) =J~[r(t)X’(t)Y’(t)+p(t)Z(t)Y(t)+g(t)Y(t)l dt* (2) 0

We assume r( t ) > 0 and sufficient continuity on the coefficient functions r( t ), p( t ), and g( t ) to yield the convergence results desired below.

APPLIED MATHEMATZCS AND COMPUTATION 15:93-108 (1984) 93

0 Elsevier Science Publishing Co., Inc., 1984 52 Vanderbilt Ave., New York, NY 10017 009&3003/84/$03.00

Page 2: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

94 JOHN GREGORY AND MARVIN ZEMAN

We give a Gale&in-type algorithm of the sort usually associated with boundary-value problems. The algorithm is shown to have optimal h2 point- wise convergence. Our method yields a global solution, not a pointwise solution, which facilitates solving the two-point boundary-value problem associated with (1). The solution is a piecewise linear approximation. For related results see Loscalzo and Talbot [7] and Werner [Q]. The algorithm yields a direct method for solving second-order linear differential equations (as opposed to solving a first-order system) and compares favorably with other direct methods such as Stormer’s method and Cowell’s method [6, pp. 291-2921. This method can be applied to a wide variety of problems such as eigenvalue problems, control-theory problems, etc.; see Gregory [5].

The remainder of our paper is as follows. In Section 2 we give the development of our basic algorithm. We use the first variational idea, that a numerical solution Xh(t) to (1) must satisfy Z(x,, y) 3 0 for any piecewise linear y(t) vanishing at t = a and t = b. The “ I ” refers to the fact that a quadrature rule has been used. In Section 3, we show that the error at the node points, ek = x(uk)- xh(uk), satisfies a secondorder difference equation. We then give a discrete Gronwall-type lemma, which is then applied to show that ek = 0(Zr2). In Section 4 we apply this result to obtain estimates of the pointwise error and L2 norm errors. In Section 5, we also show how this algorithm can be used to solve a two-point boundary-value problem, and we give the corresponding error. In Section 6, we give some numerical results, including use of a Richardson-type argument to obtain ek = O(hP) for p >/ 4. These results compare very favorably with the Runge-Kutta method.

II. THE APPROXIMATING EQUATIONS

In this section we develop the approximating equations for our algorithm. This development culminates in a twostep difference equation of the form

-L[dk,k-lCk-~+dk,kCk+f%kh3’2]> ck+l= d k,k+l

where

d k,k = ‘I?-l +r,*+h 2Pf-1+ PC

3 ’

(4)

Page 3: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Culerkin Apprcximution 95

All relevant terms are defined below. The numbers { ck} are the coefficients of the numerical approximation solution rh( t ) = c, zu( t ) of the solution x( t ) in (1). In this paper repeated indices involving (Y and p are summed. The continuity conditions are given in Section 3.

We begin by defining a uniform grid or partition of an interval [a, b]. Let N be a large natural number and h = (b - a)/N. For each 1 = -1,0,1,2 )..., N+1leta,=a+Zh,andforeachk=0,1,2,...,Nlet

ZkW = t

6p-a,l/fi if t++,,~,+,l, 0 otherwise.

(5)

Let rk = r(uk), rc = (rk + rk+i)/2, with similar definitions for p(t) and g(t) in (1).

In the continuous case, if x(t) satisfies (1) and y(t) is any continuous piecewise C’ function vanishing at t = a and t = b, then multiplying L(r) by

- y(t) and integrating by parts yields Z(x, y) = 0 in (2). In the discrete case, letting yh(t) = b,z,(t) and rh(t) = cszs(t) and noting that (2) is linear in y, we have

0 = Z(X~,.Y~) = Zb,, +a> = b&,> ~a>.

Since {b,} is arbitrary except for b, = b, = 0, we have Z(x,, zk) = 0 for each k=12 , ,...,N-l.Finally,notingthat~~(t)z~(t)=Oif~k-Z(>l,wehave

= d,,,_$-1 + d&k +dk,k+#k+l + gkh3’2*

where “ 4 ” indicates we have used quadrature, replacing r( t ) on [ ak _ 1, ak] by rc_ i, etc., and integrating, using (5). Thus, setting

dk,k=/=‘+,(n;2+pa,e} dt, ak-l

d Ok

k,k-l= J {

m;-lz; + pzk_,zk} dt,

(IL-1

we obtain (3) and (4) above.

Page 4: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

96 JOHN GREGORY AND MARVIN ZEMAN

We note that r(t) > 0 implies that d,, k+l > 0 for h sufficiently small. Thus, using (3) and (9, we generate a piecewise linear numerical solution xh(t) to (l), where xh(uk) = ckfi.

III. ERROR ESTIMATES AT THE NODES

The purpose of this section is to show that, for r( t ), p( t ), and g(t) smooth enough, the error function e(t) = x(t)- xh(t) satisfies e, = e(a,) = O(P). This estimate is optimal for our basis functions. There are two major steps in our proof. The first step is to derive the second-order difference equation for the error expression for ek in (10) below. The second step is to bound this error term.

We begin our first step with the usual Taylor-series results for an arbitrary function f(t)E C*[a, b]. We denote f”)(ak) by fii) and use & somewhat carelessly as the fixed value .$ = E(t) between t and ak as in (Sa). Thus

fct) = fk +@ - %)fk+ ;ct - %)“f,l

+ $(t - uk)3fy + &(t - uk)4f(iv)([1),

which leads to

and

fk+l-fk-1=2hfk’+~h3f”‘(Eg).

The solution x(t) of (1) with rk = ~(a,), Xi = ~(a,), etc., Satisfies

I& + I+; - PkX/( = g, ateach t=a,.

Multiplying by h2 and using (6), we have

‘k ‘k+l [ -2xk+Xk_I-#14x(iV)(~4)]

ltt (&)I - h2pkx, = h2g,. (W

(64

(64

@I

Page 5: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Approximation

Letting i, = xh(uk) = ckfi, we have from (31,

97

which implies that

- r&k+,-2x,+x,_, ]-~(f,,,-Xk~l)+hilPl;fk

=-gkh2+fk_l h2

-rk+$-1-~& I

+ f,

+ xk+l - [ 1 h$ _ -- 2( xk+l - fk_l)+h2pkfk

=-gkh2+h2(fk_,-,%,+i!,+, $-F )I I !I I

+h3(%,+1-?k-l) z-z [ 1

+ h4

+ r(‘“YtL) -~ 48

(8b)

Page 6: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

98 JOHN GREGORY

Adding (8) to (7), with ek = x(uk)- zk, we have

AND MARVIN ZEMAN

rk(ekel--2ek + ek+d+ !$(ek+l - ek-,)-h2wk

=-h2(e,_,-2ek+e,+, j(&EL)

- g(rT - p;)(ek+l-ek-l)

+ h4h,k-lek-l +2vk,kek+vk,k+lek+l )

+ qk,k-lXk-1 + qk,k*k + vk,k+lXk+l

(9)

where the (obvious) omitted details and definitions are left to the reader. Hence

THEOREM 1. Under the assumptions and notation given above, the error ek = x(ak)-xh(ah) satisfies

+h2@k,k-lek-l+Bk,kek+Bk,k+lek+l )+ h4Dk,

(10)

where A, = - r;/(2rk) and the remaining expressions are given above.

Our second step is to show that the difference equation (10) satisfies a (discrete) Gronwafl-type inequality of the type (11) below. Results of this type are found in 121, [3], and [S].

Page 7: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Appmximution 99

LEMMA 2. Suppose H(x)E C’[a, b] with a and y the muximu of IH( and IH’(x>~, respectively, on [a, b]. Let /I und X be the maxim ofIBk,k+il and I D,(, respectively, for k = 1,. . . , N-lundi=-l,O,l. Chuoseh=(b- u)/N and N large enough so that 1 - ha - h2j3 > 0. Then every solution of (10) with A, = H(u,) for which IeJ < E (p = 0,l) satisfies

* (b-a$* (e,( d K e , O<n<N, (114

where

K*= h2[h(b-u)/2+2N(ha+l)E]

1-ha-h2P

L*= 2a+(b-a)(%+@) 1-ha-h2/3 *

tw

WC)

PROOF. For I = 1 , . . . , n - 1, multiply equation (10) corresponding to 1 = k by n - k and add the resulting equations. We obtain:

[l-hH(u._,)-h2B,,._,]e,

=h{[(n-l)H(ul)-(n-3)H(u3)]ez+ .*.

+[(n-k)H(uk)-(n-k-2)H(uk+,)]ek+,+ *.*

+[3Hta,-,)-H(u,-,)le,-2+2H(a,-2)e,-,}

+h2{(n-l)B,,,e,+[(n-l)B,,,+(n-2)B,,,]e,+ .**

+ [(n-k+l)%,,k +(n-k)B,,k+(n-k-l)Bk+l,k]ek+ *.*

+[2B,-2,n-1+B”-l,.-lle”-,}

+h4[(n-l)DI+(n-2)D2+ ... +2D,_,+D,_,]

+[-h(n-l)H(u,)eO-h(n-2)H(u,)e,+ne,--(n-l)e,]. (12)

Page 8: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

100 JOHN GREGORY AND MARVIN ZEMAN

We first bound the h{ > term in the right-hand side of (12) above: Since

H E C’[o, bl, W%+, )- H(a,)= H’([,)(2h), for ok < [k < uk+s. We have (n - k)H(a,)-(n - k -~)H(u~+~)= 2(n - k)hH’(&)+2H(U,+,), SO that this term becomes

n-3 n-2

2 c (n - k)hH’(S,)e,+l +2 c H(u,+, k=l k=l

G 2h[(b -a)? + a] c lekl, k=O

since (n - k)h < Nh = b - a for 16 k < n -3. To bound the h2{ } term, since

this term is not greater than

n-1 n-l

3h2W? c jekj d 3hP(b - u) c lekb

k-0 k=O

The bound on the h4{ } is not greater than

h4X[1+2+ .a. (n-l)(n-2)

+(n-l)] =h4A 2

h2h <--iv2

2

6 h2+(b _L a)“,

Similarly, the last [ ] term on the right-hand side is not greater than 2N(ha: + l)E. Since the left-hand side of (12) in absolute value is not less than le,l[l- ha - h2/3], we have

le,( G K* + hL* ‘~~-leLI, n=l ,...,N-1. k=O

Page 9: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Approximation 101

By induction, we can show that ]e,] < K*(l + hL*)“, which implies that Je,] < K*enhL* < K*eNhL’ < K*ecbPajL*.

From Theorem 1 and Lemma 2 we have

THEOREM 3. Zfr(t) E C?[a, b], p(t)E P[a, b], and g(t) E C[a, b], and if 1 ei ) < C, h3 for i = 0,l and some C, > 0, then there exists a constant C, > 0 independent of h and a solution x(t) of (1) such that le,,l < C,h2 for h sufficiently small and 0 < n < N.

We will show in a later paper that the use of any other piecewise polynomial functions, including higher-order splines, will lead to unstable, albeit consistent, difference schemes. This contrasts with the boundary-value problem, where higher-order convergence results from the use of piecewise

polynomials of higher order.

IV. OTHER ERROR ESTIMATES

In this section we use the error estimates at the nodes derived in Section 3 to obtain estimates for e(t) and e’(t) on the interval [a, b].

THEOREM 4. Let e(t)= x(t)- xh(t), where x(t) satisfies (1) and xh(t) is the piecewise linear approximate solution to (1) given by xh(ak) = fit,, where ck is defined in (3). Let C, be as defined in Theorem 3 and C, = max aGtGblX”(t)l’ Then

max a<t<b

[e(t)1 < (Cz + ftC3)h2

max a<t<b

[e’(t)/ < (ZC, + iC,)h.

PROOF. Let x,(t) be the piecewise linear interpolate which agrees with x( t ) at the node points t = ak, 0 < k < N, and is linear in between, i.e.,

03)

(14)

Page 10: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

102 JOHN GREGORY AND MARVIN ZEMAN

By Theorem 1.i in Strang and Fix [8, pp. 44-451, we have max, 4 t G *lx(t)- x,(t)1 B &h2. By Theorem 3, we know that /~~(a~)- xr(ak)l G C2h2, k = 0 ,...,iV. Since xh(t) and x,(t) are linear in any subinterval [~~,a~+~], max ak~t~nk+llXh(t)-Xl(t)l occurs at the endpoints of the subinterval

[ I* uk, uk+l

Hence max ..,.blXh(t)-Xl(t)l~C2h2, and (13) follows from the triangle inequality

To prove (14), we use the remark in Strang and Fix [8, p. 451 that max atdtGak+,(x’(t)- x;(t)1 < iC,h. Since xh(t)- x,(t) is linear in any subin- tervd [a,, ak+l]r we have, for any t in this subinterval,

([%w-4t)l’l= ~[~h<“k+,>-rl<uk+,>]-~~h<uk>-x,(uk>]~

h

by Theorem 3. The result (14) follows by the triangle inequality.

COROLLARY 5. Let Ilellt = j,b[e(t)12dt and let Ilellf = lIeI\: + Ile’($ Then

llello 4fi(C2 + &)h2 (15)

lle’ll, < G(2C2 + bCs)h. (16)

Hence,

llell, G Gh for a suitable constant C, . (17)

The result (15) follows by squaring (13) and integrating over [a, b]. The result (16) follows in a similar fashion from (14).

Page 11: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Approxhution 103

V. SOLUTION TO THE BOUNDARY-VALUE PROBLEM

The purpose of this section is to show that our initial-value methods yield a solution to the boundary-value problem (18) below. More precisely, we show that the numerical solution to (18) is obtained from a linear combination of the two initial-value problems (19) and (20) below. Thus we avoid more standard matrix-type elimination methods. We also show that this solution has the optimal h2 estimates. We leave as an exercise to the reader the proof of the other estimates in Section 4.

We note that we do not require p(t) > 0, as is usually done when studying the two-point boundary-value problem. For a discussion of a direct solution to the boundary-value problem yielding pointwise estimates similar to ours, see Douglas and DuPont [4].

We consider the boundary-value problem

[r(t)d(t)]‘- p(t)x(t) = g(t), a < t < b,

x(u) = a, x(b) = P, (18)

and assume that this problem has a unique solution. This solution is given in (21) below. The corresponding numerical solution rh(t) is given in (22). Equation (21) is motivated by Burden et al. [l].

PROPOSITION 6. Consider the two initial-value problems

[r(t)y’(t)]‘- dt)y(t) = g(t), a <t <b,

y(a) = a, y’(a) = 0, 09)

and

[‘(t)z’(t)]‘-p(t)z(t)=O, a<t<b,

z(a) = 0, z’(a)=l. (20)

Assuming that the problem (18) has a unique solution, this solution is given

by

x(t)=y(t)+ ~$b)n(t). (21)

Page 12: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

104 JOHN GREGORY AND MARVIN ZEMAN

PROOF. We will first show that z(b) # 0 so that (21) is well defined. The assumption that the solution of (18) is unique implies that the only solution of

[r(t)d(t)]‘- p(t)+) = 0, a < t < b,

x(u) = 0, x(b) = 0,

is x(t) = 0. Hence if n(t) is a solution of (20) satisfying z(b) = 0, then z(t) = 0, which implies that z’(a) = 0, which is a contradiction.

Next we will show that (21) is indeed the solution of (18). Let Lw = (d)’ - pw. Then

Lx(t) = Ly(t)+ P-y(b)Lz(t) z(b)

= g(t).

For the boundary conditions, we have

and

THEOREM 7. Let y,,( t ) and z,,( t ) be the numerical approximations to y( t ) and z(t) in (19) and (20) respectively. Let x(t) be the solution to (18). Then, for h sufficiently mull,

%(t) = Yh(t)+ P - ydb) z

Z/,(b) ’

(t) (22)

satisfies

max Ix(t)-X,,(t)l<Ch2, act<b

where C is a constant independent of h.

Page 13: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

A Galerkin Approximation 105

PROOF. Since z(b) + 0, we have zh(b) z 0 and I[ z(b)- z,(b)]/z(b)] < 1 for h small enough. Thus,

$b) = z(b)+ [z,fb)-z(b)] 1

I

1 =- z(b) I_ @-z,(b)

z(b)

Subtracting (22) from (21),

x(t)- Q(t) = YW Yh(t)+ P - y(b) z(t>_ p - ydb) z

z(b) 4b) h (t> I

= Y(f)-y,(t)+

where A are the terms containing the powers (z - zk)‘( b), where 1 = 2,3,4,. . . . The estimate in the theorem follows from Theorem 4, since each summand in the last equation is O(h’).

VI. TWO EXAMPLES

In this section we give results for two test cases. In the first case (Table 1) we have r(t)=2+cost, p(t)=2+2cost, and g(t)=0 in Equation (1). In the second case (Table 2) we have r(t) = 2 + cos t, p(t) = 2 +3cos t, and g( t ) = sin tcos t. The reader may verify that x( t ) = sin t is the solution to both cases satisfying the initial conditions x(O) = 0 and x(h) = sin h.

In Tables 1 and 2, columns (a)-(i) represent: (a) the independent variable t (not shown in Table 2) (b) the actual value sin t, (c)-(f) the differences

Page 14: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

TABLE1

VA

LU

ES

OF

X

(t)-

X

j>(

t)

AN

D

X(t

)-

X;(

t),

WH

ER

E

Xf(

t)

= [4Xhp(

t)- Xh( t)]/3"

r(t)

-- x

/I(t)

x(

t)-

G(t)

t

sin

t h=

&

h=&

h=

&

h=&

h=

&

h=&

h=

&

0.50

0.47942554 -0.172004

1.00 0.84147098 -0.126003

1.50 0.99749499 -0.358Da3

2.00 0.90929743 -0.654~-03

2.50 0.59847214 -0.893~03

3.00 0.14112001 -0.100D-O2

3.50 -0.35078323 -0.107002

4.00 -0.75680250 -0.116~02

4.50 -0.97753012 -0.117~02

5.00 -0.95892427 -0.927~-03

5.50 -0.70554033 -0.393D-03

6.00 -0.27941550 0.302D-03

6.50 0.21511999 0.924D-03

7.00 0.65698660 0.121D-02

-0.435D-05

-0.3161~04

-0.897~04

-0.163~-03

-0223IbO3

-0.251~03

-0.267~03

-0.29h-03

-0.293~-03

-O.!Z!32~-03

-0.984DO4

0.757D-04

0.231D-03

0.304LkO3 -0.109D-05

-0.791D-05

-0.224~-04

-0.409D-04

-0.558D-04

-0.628~04

-0.669D-04

-0.729~-04

-0.733D-04

-0.58oD-04

-0.246~04

0.189004

0.578~04

0.76h-04 -0.273~-06

-0.198~05

-0.561D-O5

-0.102mO4

-0.139004

-0.157004

-0.167004

-0.182~-04

-0.183E-04

-0.145D-04

-0.615~-05

0.473D-05

0.144Do4

0.19OD-04 -0.695mO7

-0.13oE-06

-0.Nb-06

-0.165006

-0.133D-06

-0.12b-06

-0.140~-06

-0.154~-06

-0.152~06

-0.110~-06

-0.17bO7

0.938Do7

0.158D-06

0.118LFO6 -0.434~-08

-0.817~-08

-0.105D-07

-0.103D-07

-0.832~-08

-0.757~-08

-0.875~-08

-0.964~-08

-0.951Do8

-0.688JI-08

-0.106D-08

0.586Do8

0.989Do8

0.74b-08 -0.2171~09

-0.51oD-09

-0.656~-09

-0.646~09

-0.521~09

-0.475D-09

-0549mO9

-0.605D-09

-0.597D-09

-0.432~~09

-0.673~10

0.367~-09

0.620~~09

0.465~-09

Ur(

t)=2

+co

st,

p(t)

=2+

2cos

t, g(

t)=

O.

Page 15: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

TA

BL

E

2 V

ALU

ESO

FX

(t)-

X~(t

),3C

(t)-

~~(t

),A

ND

X(t

)-Z;K

(t),

WH

EB

E

Xp(

t)

AR

E

TH

E

RU

NG

E-K

UT

TA

V

ALU

ESa

r(t)

- rh

(t)

x(t)

- e(

t)

x(t)

-Xp(

t)

t h=

&

h=&

h=

&

h=&

h=

&

h=&

h=

&

h=&

h=

&

0.50

-0.971d)5 -0.245~-05 -0.616~-06 -O.l54~-O6 -0.414~-07 -0.259D-08 -0.161~09

0.881D-07 0.540~-08

1.00 -0.72h-04 -0.18h-04 -0.453~-05 -0.1131~05 -0.8-7

-0.562~-08 -0.35h-09

0.104D-06 0.613Do8

1.50 -0.212~-03 -0.532~-04 -0.133~1-04 -0.333D-05 -0.139~-06 -0.873~-08 -0.545~-09 0.566m

-0.428D-09

2.00 -O&%-O3

-0.KNh-03 -0.265~04 -0.664Do5 -0.172006 -0.10811-07 -0.674~-09 -024%-06

-0.14oDo7

2.50 -0.708~03 -0.177~03 -0kKb-04

-0.llODo4 -0.177~-06 -0.111~~07 -0.692D-09 -0.518~-06 -0.338~07

- 3.00 -0.114~-02 -0.286~-03 -0.716~-04 -0.179~-04 -0.147~-06 -0.919D-08 -0.57b-09 -0.981ra-06 -OK%-07

3.50 -0.186~-02 -0.467~-03 -0.116~-03 -0.292&4

-0ZAh-07

-OX%-08

-0206~4X3 -0.170~-05 -0.109~06

4.00 -0.277~-02 -0.694~-03 -0.173~-03 -O&h-O4

0.51oLa7

0.320~08

0.208~09 -0.257~-05 -0.165~06

4.50 -0.34OD-02 -0.851D-03 -0.212D-03 -0.532D-04 0.923D-07 0.579D-08 0.371DO9 -0.317D-05 -0.203D-06

5.00 -0.326Do2 -0.815~-03 -0.203~-03 -0.509~~04 0.121D-06 0.762~~08 0.485~-09 -0.305~-05 -0.195D-06

5.50 -0.217~-02 -0Sb-03

-0.Mh-03

-0.34O~-O4 0.212D-O6 0.132~-07 0.837D-09 -0.205D-05 -0.131Du6

6.00 -0.409~-03 -0.102~~03 -0.255~-04 -0.637~-05 0.332D-06 0.207D-07 0.13OD-08 -0.394Ld6 -0.259D-07

6.50

0.146D-02 0.366D-03 0.915D-04 0.228DJM

0.347D-06 0.217~-07 0.135~-08 0.137D-05 0.867~-07

7.00

0.278~02

0.696Do3

0.174D-03 0.435D-04 0.126D-O6 0.786&8

0.483DO9

0.262~@5

0.167006

“r(t

)=2+

cost

,p(t

)=2+

3cos

t,g(t

)=si

ntco

st.

Page 16: A Galerkin Approximation for the Initial-Value Problem for Linear Second-Order Differential Equations

108 JOHN GREGORY AND MARVIN ZEMAN

x(t)- am for h = &, hi, &, and & and (g)-(i) the Richardson differences x(t)- x;(t) for h = $, 8, and &, respectively.

The Richardson extrapolation r:(t) is defined by

X;(t)= 4xh,Z - xh

3 .

Since the difference equation for the error e(t) we derived is fundamentally similar to the difference equation we get by using finite-difference methods, following the argument in Strang and Fix [8, pp. 19-201, we note that x(t)- x;(t)= 0(h4). W e o b serve that this is confirmed by our data.

Finally, columns (j) and (k) in Figure 2 contain Runge-Kutta results; see [l, p. 2821. We note that four evaluations are needed for each Runge-Kutta step, so that the Runge-Kutta values of h = & should be compared with the values of, xl,& t) and the values of x &a,( t ). As the reader can see, our values of x1,&t) are better than the Runge-Kutta values for h = A. In fact, in this case, the Richardson values for h = & and h = & are better than the respec- tive value for h = & and h = & for Runge-Kutta runs.

REFERENCES

R. L. Burden, J. D. Faires, and A. C. Reynolds, Numerical Analysis, Prindle, Weber and Schmidt, 1978. G. Dahlquist, Convergence and stability in the numerical integration of ordinary differential equations, Math. Stand. 4:33-53 (1956).

Stability and error bounds in the numerical integration of ordinary differential equations, Trans. Roy. Inst. Technol. Stockholm, No. 130 (1959). J. Douglas, Jr., and T. Dupont, Galerkin approximations for the two point boundary problem using continuous, piecewise polynomial spaces, Numer. Math. 22:99-109 (1974). J. Gregory, Quadratic Form Theory and Bffzrential Equations, Mathematics in Science and Engineering, Vol. 152, Academic, 1980. P. Hemici, Discrete Variable Methods in Ordinary Differential Equations, Wiley, 1962. F. R. LoscaIzo and T. D. TaIbot, Sphne function approximation for solution of ordinary differential equations, SIAM J. Numer. Anal. 4~433-445 (1967). G. Strang and G. J. Fix, An Analysis of the Finite Element Method, Prentice-Hall Series in Automatic Computation, 1973. H. Werner, Interpolation and integration of initial value problems of ordinary differential equation by regular splines, SIAM J. Numer. Anal. 12:255-271 (1975).