Sunteți pe pagina 1din 17

Mathematical Problems

STEVEN Colorado and PRUESS

Software for Sturm-Liouville

School of Mines

CHARLES T. FULTON Florida Institute of Technology

Software spectral ing the described, Categories

1s described density and and coefficients several

for forms

the the

Sturm-Liouvllle with mathematical are presented G.1 7 G.4

elgenproblem global basin. error The

Eigenvalues, control. underlying

elgenfunctlons, algorithms are

and briefly

functions

can be estimated

The method

of approximat-

examples

Subject

Descriptors:

Equationsboundary
Softwarealgorithm General Additional methods, Terms: Key spectral

Lalue
analysts

problems,

[Numerical [Mathematics

Analysis] Ordinary Differential of Computing]: Mathematical

Algorithms, Words and

Performance Phrases spectral Approximating density the functions, coefficients, Sturm-Llouvdle elgenfunctlons, eigenvalues shooting

classification,

1. INTRODUCTION The Sturm-Liouville functions eigenproblem U(.~ ) such that


(P(x)zz) with boundary conditions (at least +

considered

is

to

find

constants

A and

nonzero

q(x)zz = Ar(x)u
endpoints), ci; (pu)(zz)l

(1)

at regular

Z1lzda)

Cq(pu)(cz)

= A[f+u(cz)

(2) (3)

~lu(b)

+ &(pu)(b)

= o.

Th,s and Florida Authors School Florlda

research DMS-8905239 Institute

wae

partially to the

supported Colorado School

by

Nat]onal of Mines,

Sc]ence and

Foundation and

grants

DMS-88000839 to the

DMS-8813113

DMS-8905202

of Technology S, Golden, of copy Pruess, CO Department 804011887: Melbourne, fee for Its direct date all or part of C. FL of this Mathematical T. Fulton, and Department Computer of Sciences, Applied Colorado

addresses: of Mines,

Mathematics,

Institute to or

Technology, without

32901-6988. material is the given or granted ACM that to provided copyright copying repubhsh, is by that notice the and copies the of and\or are title the

Permission not of made the

distributed and Computing

commercial appear, and To

advantage, notice copy is

publication for permission. ACM

permission a fee

Association specific @ 1993 ACM

Machinery.

otherwise,

requires

00983500//93/0900-0360 on Mathematical Software,

$01.50 Vol 19, No 3. September 1993, Pages 360-376

TransactIons

Mathematical We assume, consistent with

Software for Sturm-1-iouville Problems (e.g, [5] and [6]), that

361

the theory

when aj # O and aj # O. (We have not allowed in the boundary condition at both ends because developed only (1) if a and
b are finite,

the eigenparameter to occur the theory has not yet been be considered regular if and

for

this

case.)

The

problem

(1) will

(2) p(x)
(3)

and

r(x) q(x),

are positive and r(x)

in (a, b), integrable near the endpoints. mathematical theory

l/p(x), the

are locally

Otherwise,

problem
p, p, q,

is called

singular.

Standard continuous can be number

assumes that finite number defining For regular

of finite mesh. problems,

and r are at least jump discontinuities there are an infinite

on (a, b) although a handled by suitably of eigenvalues

an input

each

eigenvalue There

has

an eigenfunction asymptotic

which and

is unique oscillation

up to a normalizing properties [4, 7, 13].

constant.

are known

For singular problems, there is a wide range in the behavior of the eigenvalues (including the possibility where the spectrum is purely continuous). We have written a FORTRAN77 code to produce estimates within user-prescribed the of The tolerances attempts limit our section point for the eigenvalues, spectrum, each circle, of to classify or limit existence results provides eigenfunctions, the spectral problem oscillatory and on the density and, for some singular function. it In used; In addition, is regular the number this paper we 3-5 mathematics. Sections or cases having code singular, summarize next continuous

as to whether or nonoscillatory, etc. the underlying

eigenvalues,

continuous algorithms

spectrum,

on the

background

approach

have details on the algorithm itself. The final section contains examples of typical output from the code. The first software package for this problem was SLEIGN of Bailey et al. [ 1]; a recent value (l). While revision quite has reliable appeared for many (Bailey global et al. [2]). applied It uses very standard slow, and initial fails integrators (monitoring errors) problems to a Priifer of singular was written written by transformed problems is for regular Pryce and collection has Group, and we

it is often

completely attempted. problems;

on some problems. The code D02KEF recently a new

No classification in the NAG library package has

NAG

been

Marietta [19] which also kindly been made available

handles singular problems. This to us by the Numerical Algorithms

have used SL02FM from it to make comparisons. It too uses a Prufer transform but its integration method is much closer in spirit to ours. Preliminary results cited for this code [19] show it to be slower than ours, especially at tight tolerances; NAG codes attempt our testing has confirmed this. Neither to provide information about the spectral
ACM TransactIons on Mathematical Software, Vol

SLEIGN density

nor the function.


1993.

19, No.

3, September

362
2.

S, Pruess and C. T Fulton

BACKGROUND
approach we have taken is to replace (1) by a new problem (4)

The fundamental

(jil)
with analogous boundary alti(cz) fl,z2(b) where ~, ~, and conditions =

+ @2 =

Ml

a2(j3z2)(a) + p,(jti)(b)

i[a~ixa) aj(pti)(a)l
approximations to p, q, and r, respec-

= o

? are step ftmction

approximations have been mathematically analyzed by Pruess least when a; = a; = O. Given the mesh a =xl <xz < < is to use midpoint interpolaN+ 1 = b, the usual choice for the step functions tion, i.e., j(x) and lems similarly a more for

tively. Such [14, 15], at

=pn
the

:=p
other

Xn +Xn+l 2

forxin(x., This [17])

x.+l) choice works quite probnear the known For

coefficient problems; the technique

functions. however, (see [101 and Equation

reasonably singular midpoint closed form

(see [141) for regular sophisticated the endpoints interpolants, solution to capture

for some singular is necessary behavior. has the

appropriate

asymptotic (4) then

differential

in ( x~, x.+ ~) Xn) + (@ii)(xn)@n(x

ii(z)
with

= .ixxn)(j;(x

.%n)/pn

(5)

@n(t)

where
Tn

(
t
=

sin

w. t / w.

Tn>()

sinh

w.t/W.

r. <0 rn =0

(Ln -

qn)/pn

and wn=m In practice, one should use a truncated o.(t) and only use the with ii(a) sin and = t[l
sirdz

series

expansion

for small

1~~ Ih:,

e.g.,

r.t2/6

+ 7;t4/120] when with [~~Ih; is sufficiently condition, large.

formulas consistent

Starting

and ( oil )(a)

the boundary

(jfi)(a)

= a,

a$i,
continuity
3, September 1993

(7)

a first
ACM

algorithm
on

is to compute
Mathematical

for

n = 1,2, . . ., N (to enforce


Vol 19, No

of C

Transactions

Software,

Mathematical

Software for Sturm-Liouville

Problems

363

il(xn+l)

Z2(xn)cf);(hn) + (~i2)(xn)@n(hn)

/pn

(8)

(jil)(xn+l)
which
the is a shooting

= -i-npnixxn)f#n(hn)
method (with = r. ~~(t). until
a step the

+ (Bti)(xn)(bn(hn)

(9)

fact
yield

that
an

~~(t)

exact integrations). For a fixed mesh boundary


A Ah to some function 1

In deriving (9) we used we can iterate on the at


by b is satisfied. This

approximate
will The problem

eigenvalue
(4) has

condition
Ak. given

0( hz ) approximation spectral

p(t) = x J?(x)il~(x)clx a +
where the sum is taken over k such that ~~ s CY;al. llstimates to previous extrapolation the ~etermined (4) united for Each with by a

t,and

a = a~az
Our Global sequence levels its errors It users its code, Error mesh and should input called SLEDGE, for

Sturm-,Liouville solutions until from the ([21])

(control), (called consists

calculates levels) points or Wynns of the

step-problem is levels mesh is used

of meshes

sufficient

accuracy

attained.

midpoints.

Richardson accelerate be noted

to estimate

convergence that for

of sequences a singular constants classification the Freidrichs these of the

of approximations. the code code will ignore to carry the out autoAt a

problem if the

boundary

condition The for

is allowed in

automatic find

classification. the limit constants circle

algorithms boundary

SLEDGE condition.

matically nonoscillatory serve limit is ~z

endpoint, extension boundary either

Friedrichs underlying

boundary operator; select the to

conditions while solution selecting in the which the

to select point near

a self-adjoint the Friedrichs In

case, the solution

conditions this is

endpoint. at the boundary

case

equivalent If the user

principal

nonoscillatory condition

endpoint. constants (or

wishes

to choose with to the with is overthey

non-Freidrichs oscillatory i.e., the singular appropriate then riding provide We needed since code code errors the of the to the close in there must the must in this limit user one users

to

attempt interval

problems converging problems error information control the

circle and

endpoints) SLEDGE boundary In

it

is necessary of regular to each of we

to use endpoints the strongly of the

truncation,

must

choose apply input

a sequence

regular (global useful

user

condition general, because

constants

responsibility!).

discourage

classification code. section for by

algorithms

giving number to

an solutions

overview

of

some and that

of

the

components First, the requests. the global

a code may be core and an

estimating

to Sturm-Liouville of eigenvalues

problems. eigenfunctions, the user procedure,

be an infinite automatically of the only

able

select

the

one(s) which in order

Because eigenvalue

eigenvalue eigenvalue. it

calculation (interval) Second, that

is a zero-finding contains to

be able

to generate this manner,

a bracket

a prescribed the automati1993.

control

efficient

is critical

meshes Software,
Vol.

be chosen
19, No.

ACM Transactions

on Mathematical

3, September

364 tally
the since

.
and

S. Pruess and C. T. Fulton


relatively cheaply. calculation applications, which underflows problems to determine range Additionally, which, especially over and whether and at a how singular intricate, details many ideally, those orders stable are from procedures not memory must be used for

eigenfunction typical

intensive. mechanics, it is important

Next, have to

quantum

eigenfunctions guard for in against singular order are be

of magnitude, the is what nature

overflows or not

in intermediate there and continuous (if any) the

calculations. of the spectrum, boundary theory for

Finally, singularity when condition singular if cases

it is desirable

to ascertain

there should problems

eigenvalues imposed can

many,

endpoint. we on only the

Since attempt

be exceedingly mathematical [10].

to do a reasonable of singular

incomplete will appear

job; in

classification

3. A STABILIZED
Since that the this core be done to of

SHOOTING
our code

ALGORITHM
is Note since the from that we shooting the for are algorithm recursio~s a given talking A the here for (8) and only about computing (9), error present the is it is critical

approximate roundoffi

eigenfunction accurately. this, emphasize

values

a fixed

mesh, value in the

the~e the

is no truncation

error

in computing when errors, follows with and we

the

ii( x. ) values stability in the index

for a given interested

of A in (6) and effects exact to the Three

(7). Hence, what

we discuss omit

we are an iterate

of ~1) roundoff A~ ). In

(2) errors

~ (compared on

(subscript) forward

eigenparameter shooting ing, backward implementation (6) and (7):

for simplicity. algorithms variations are considered: shoota direct values of shooting, and double shooting. The first is just of the recursions (8) and (9) subject to the starting c .+, (pzl),,

= (b;(lzn)tin

+ [q5n(hn)/pnl(@)n, + @:(hn)(pti)n. is Az(hn)/Pn @;(hn) ) when


Tn <

(lo)
(11)

+1 Pn Tn@n(hn)tin = for this recursion

The amplification

matrix

(
It has spectral radius

O;(h.)

Prl~ll 4,, (h,, )

p = qh~(hn) + conon(hn)

= exp(co~h.)

with p = 1 otherwise. This suggests that the recursion can be unstable when many 7, < 0 because of the exponential growth (see [161 for numerical evidence of this instability). To avoid this, let Vn =

(
1

exp(tinhn)

Tn<

otherwise.

Un =

yi2(xn)/[(T1cT2

On.l]

and 1
n
ACM Transactions on Mathematical

y(pti)(xn)/[a1cr2
Software, Vol 19, No

O&ll.
1993

3, September

Mathematical The factor value -y occurs because

Software for Sturm-Liouville not said how In terms

Problems

365 the

we have shortly.

il is to be normalized; new variables,

of y will

be specified

of these

we have

the recursions
v ~+,

= *;vn
P.r.

+ [*n/pn]v;

(12) (13) 1 by construction of

vn+l= The spectral m.. To start radius of this

@nlJn+ *;V; . matrix is clearly

amplification let v,= vi= (a, (al -

the recursion,

aii)/% a~i)/uo

where 00 = max(lal The eigenvalue ~ is characterized Pl%+l Since ti( x ) is known exactly. The formula n+ i(x) X. ti(x)2
dx

a~l,laz

a~~l}. condition at b, i.e.,

by the boundary + /32vh+l = 0.

in closed form, its weighted 2-norm over the nth interval is (for r. # O)
= r@[c#&)@~(h.) + h.1/2

can be computed

+ fi.(fifi).

@n(~n)2

+(lmmzn The second algorithm is called

+n(hn)4;(hn)l/( reverse and shooting, (11).

2Tn)}. more of the

(14) than a

and is nothing Analogs of all

backward recurrence on n in (10) forward equations exist, in particular, iln = dj(hn)tin+~ (jil)n As before, this
=pnTn@n(hn)tin+l

above

[@n(hn)/Pnl($fi)
+

n+l

d;(hn)(;fl)n+l.
(for a~l n = IV, N 1,...,1)

can be unstable,

so we define

Wn = ail(xn)/[anun+l w; = i5(:i2)(xn)/[

anan+l

a~l. variables, we have the

The scaling factor 6 will be chosen shortly. For these stable recursions (for n = N, N 1, ..., 1): Wn = +;W.+l
w;

[*n/P.l%+l +
*iwn+l -

(15) (16)

= Pnrn*nwn+l

To start

the

recursion,

set WN+ ~ = ~+1 ~2\ffN+l

= ~l\VN+l
on Mathematical Software, Vol. 19, No. 3, September 1993.

ACM

Transactions

366 where

S. Pruessand

C.T. Fulton

N+ 1 = rnax{l~ll, The eigenvalue ~ is characterized

l~zl}. condition at a, i.e.,

by the boundary

(a, - 4+0, - (a, The weighted 2-norm of the eigenfunction

a+i

= o.
interval is (for r. # O)

over the nth

G~+~ [hn

(@i7)n+1(bn(hJ2 + (jil):+l
27n)}. (17)

@n(hn)@L(hn)l/(

The final algorithm is a combination of the above order to yield output satisfying the boundary conditions the possibility shoot
mesh

scaled recurrences. In exactly, and to lessen


index of an interior

of underflows
and calculate

and overflows the middle.


for n = 1,2, v.

in (12) and (13) and (15) and (16), Let


m be the . . . . m;

from
point

the two ends toward to have

the

w.

for

n = IV + 1,

N,.

. . . m. In order

the appropriate

smoothness

One of these approximate

is used to define eigenvalue.

the ratio

y/8 if

while

the other

characterizes

the

For example,

then

~ is characterized

as satisfying

with of the

an

analogous

formula

for of scale

( fiti is

)..

Since (12)

we

expect (13),

Vm to be O(1) a reasonable

because choice of

induced

stability problems

of the

recursions

and

y to minimize

y=o-~ so that
ACM

urn_, to normalizing
3, September 1993

il~

= O(1)
on

as well.

This
Software,

corresponds
Vol 19, No.

the approximate

Transactions

Mathematical

Mathematical eigenfunction so that

Software for Sturm-LiouviIle

Problems

367

iin =

and similarly It stable that form region

for the approximate to choose the (where ~~ > O); hence, with respect to matching

1
Vm

vn/(~nfln+l

rm.l)
.. an.,)

n<m n.m
m ~ n

(18)

(Vm/Wm)Wn/(~m

derivative. index
m

is desirable

where

matching heuristic

occurs

to be in

our preferred

is to choose

m so

~~ is maximized this corresponds

to n. For problems near the minimum

in Liouville normal of the potential. An if

exception we allow is to choose either (1) a = b and ~ > 0 near The formulas for the weighted follow m1 from (14) for 1<

the m corresponding to x = (CZ+ b)/2 O; or (2) 7. > 0 for all n. 2-norm of the approximate eigenfunction m < n < IV, and (18). For

n < m, (17) for

n = 1, . . . .

+(hn/2)(w; Care setting must be taken than

+ (w:)2/Tn)} calculation

[%+1%+2

o.

wN]2/82.

in (18) and the norm small quantities both the Ui, and when

to avoid we have

underflows level

(by in the

appropriately

to zero). What norm and the

done is to carry eigenfunction inverse method using the

log u, rather denominator values Note that iteration as [14, 16]. As a final forward parameters eigenfunction used, later requiring

a (machine-dependent)

overflow

is exceeded,

approximate

are set to zero. this scaled shooting advocated in earlier comment, algorithm discussions avoids the need for of the underlying are desired no storage then

if only eigenvalue (12) and

estimates and

recursions

(13) is sufficient,

of the

scaling

Oi is necessary; only the initial mesh needs to be stored. When information is sought, then the double shooting algorithm is storage output of scale factors points as well as eigenfunction level estimates mesh) at for of each intermediate (bisected

the user-specified extrapolation.

4. BRACKETS

VIA A ZERO-COUNTING

PROCEDURE
finder applied to a

The search for the eigenvalues function F defining the boundary F(A)

uses a standard zero condition at b, i.e., + B2(@)(b).


Software,

= ~ltl(b)

ACM Transactions

on Mathematmal

Vol. 19, No. 3, September

1993.

368 First, the


find have function easily

S. Pruess and C, T. Fulton the desired eigenvalue,


but no but

however,
k th such

say
other. not the

Ak, must that


the the [9] For for

be isolated this
exact function

from
(1),

the
to we is

remaining

ones. We seek a bracket


approximate a bracket d across to the eigenvalue is very for b). (a, difficult, calculating From ~ such

[ ~~, qk ] such

interval
problem

contains

F because
of the latter associated number

a simple related

procedure index

number theory

of zeros the

oscillation that

Based

on this, detail,

a binary the fi(x)

search

can be used r. <0,

to determine has a (single)

appropriate zero in (x.

values x.. ~)

for the bracket. In more if and only where Onii(rn) y = arctan This
the of A.

in (5), when of integers

if il( x, )2( x.+ ~) < 0. When the number

r. > 0, the

oscillatory (y/

case, the numrr, (y + co. h. )/ n)

ber of zeros equals

in the interval

ti(xn) as we
function

shoot from
a

number
total number

of zeros

is

accumulated
zeros of the

to

b yielding
value

of interior

ti( x ) for

the

current

5. CONSTRUCTION Among When the duties

OF THE INITIAL MESH


carried out initially planned, by SLEDGE it was felt that is the periodic choice of mesh. redistribution

the code was originally

would be necessary for reasons of efficiency (a poor initial mesh could lead to very slow convergence). Of course, with Richardsons extrapolation, when we redistribute the mesh, none of the prior information can be used directly; hence, there is a considerable experience with the current sufficiently ever. While execution One probably function positive that the there are certainly times, overall, difficulties penalty for redistributing heuristics for determining too often. In fact, our the initial mesh is

code currently does no redistribution whatsoexamples where this results in slightly higher to be an acceptable the mesh is that approach. meshes are different

it has proven in choosing

of the

needed depending on whether eigenvalues, eigenfunctions, or eigenderivatives are being estimated. Computationally it is desirable to

compute these simultaneously using the same mesh. The dominant term in the mathematical error for the eigenvalue estimation is (see Pruess [ 14] or just subtract the corresponding Rayleigh quotients and rearrange)

Ai=
After (from expanding

J;{[P -fi][ZL]2
the coefficient the error
+P(U)2

+ [q @ A(r
): nz2 dx in a series about like

i)]u}dx

errors

the interval

midpoints

[121 and [13])


h;{4puu

is a sum of terms
+ 4(q ~r)~~
19, No.

+ 4(q

Ar)u2}~
1993

ACM

TransactIons

on Mathematical

Software,

VO1

3, September

Mathemahcal where the n subscript

Software for Sturm-Liouville in braces means

Problems

369

on the term

evaluate

at the midpoint

of interval problems,

n. Unfortunately, as is typical the quantity to be equidistributed

for two-point boundary value depends on the answer, suggest-

ing that some kind of iteration (redistribution) is needed with approximate eigenvalues and eigenfunctions used for A and U(x). As discussed in the initial paragraph of this section, we would prefer to avoid this for reasons of efficiency. find Also, we anticipate calculation that the most likely application of the code is to prefer to avoid a few eigenvalues. unavailable. To save time Two index in these cases, we would appear: infinity)

any eigenfunction is effectively formulas

at all. Hence, alternatives approaches

the quantity

to be equidistributed (1) use the asymptotic for the eigenfunctions,

(as the eigenvalue

(2) use a different equidistribution heuristic. Unfortunately, the first choice, though implemented, did not work very well. Not surprisingly, it worked all right for the larger indices but poorly for small values of this index. The heuristic currently used is partly suggested by the form of the errors in approximating errors as major fundamental equidistributing factors the coefficient functions. U(x) The rationale is threefold: a priori, errors, (4). This (3) they error (1) these occur are the suggests are independent in both errors of A and eigenvalue in made so can be done (1) with (2) they

and eigenfunction

replacing

hnmax{lpln,lqln,l~
where by I p 1. is meant a representative

in}
magnitude of the derivative

(19) on the

rzth subinterval of the mesh. In fact, we use the magnitude divided difference at the midpoint. Since any equidistribution doomed by finite sampling we have additionally required satisfy actual There approach normal Finally, is so small implemented bounded algorithms are times form mesh used when ratio criteria to prevent using the bizarre are essentially the mesh the this on the mesh idea (Birkhoff points and Rota with those near in Kautsky

of the central scheme can be our meshes to The [12]. Liouville currently process it is

distributions. and Nichols of the of (19).

generated

(19) is poor. An alternative minimum

is to cluster potential combines (typically

[3, p. 297]). The heuristic in the equidistribution singular

the equidistribution sampled for many

since the number

of points order

of tens),

problems

desirable to add a few mesh points in the neighborhood endpoints. For differential equations with regular singular totic behavior of U(x) (as x approaches the singular point) from Frobenius actual algorithm r(x) as well, classification theory which suggests requires the leading that The process. details how these asymptotic

of the singular points the asympcan be determined The and

points should be placed. behavior of P(x), q(x), determined and during underlying

quantities

are automatically of this

our codes matheis

algorithm

matics will appear in separate papers [10] and [171. For problems with infinite endpoints, the change of variable made (implicitly) in to the first or last chosen were { ~, ( ~, 1) and (1, ~)

t = I/x

the neighborhood of the infinite endpoint corresponding initial mesh interval. For example, if the initial mesh 1,0, 1, ~}, then the change of variable would be used on for this mesh and all of its subdivisions.

ACM Transactions on Mathematical Software, Vol. 19, No 3, September 1993.

370

S. Pruess and C. T. Fulton

6. EXAMPLES From our current test set of over 175 examples, For uniformity, 80387 chosen we present times math a few illustrations were clocked on The from current Pryce

of SLEDGEs

capabilities.

all reported

a 33 MHz 80386 PC with a 33 MHz release is available over Netlib. For eigenvalue estimates we have

coprocessor. example

a difficult

[18], the Coffey-Evans equation. Even though the mathematical theory guarantees that for the separated boundary conditions (2) and (3) there can be no multiple eigenvalues (for regular problems), the triple well of the Coffey-Evans potential produces triplets of eigenvalues by deepening the well. Here U with u(m,/2) The parameter ~ controls the depth = u(7r/2) of the = o. well; we have used a value of +(2~cos which can be made arbitrarily close

2x+~2sin22x)zf

=Au

B = 50 here which is very tight tolerances of 10-12 Table I for the first of the triplets, it was able

difficult for other were requested, While what to return

existing software [18]. men very the code delivered the output in the code had to work appear hard on some answers. which to be reasonable

13 eigenvalues.

Note: for each example in this section is used for both absolute and relative As a second example, u on ( CO, C).The output C consider + {gexp(2x) from

we give a single tolerance value tolerances required by the code. potential (from =
AU

the Morse

[1]):

18exp(x)}u algorithm

the classification

is the following.

The spectral category is 2. This problem has simple spectrum, There IS continuous spectrum in [Ev, infinity) where Ev = 0.000000 There appear to be 3 eigenvalues below the start of the continuous spectrum At endpoint A the problem is singular; it is nonoscillatory for all Ev, The constants for the Fnednchs boundary condition are 1.000000 0.000000 0.000000 0.000000 It is limit point. At endpoint B the problem is singular; it IS nonoscillatory for all Ev < 0.000000, and oscillatory otherwise. It Is limit point. The
(2).
ACM Transactions on Mathematical Software, Vol. 19, No. 3, September 1993

spectral

category

referred
at

to is that
the

described
codes

in

[10];
for al,

the
a;,

boundary
Q2, a; in

condition

constants

given

A are just

choice

Mathematical
Table I. Eigenvalues

Software for Sturm-Liouville


of the Coffey-Evans Equation.

Problems
( ~ = 50)

371

Ev# o 1 2 3 4 5 6 7 8 9 10 11 12

Estimate

of ~
(in

Time

seconds) 3.2 3.2 5.2 30.5 29.4 3.5 4.5 31.0 29.8 3.0 52.8 51.8 7.7

0.00000000000 197.968726516 391.808191489 391.808191489 391.808191489 581.377109231 766.516827285 766.516827285 766.516827285 947.047491585 1122.76292007 1122.76292007 1122.76292007

When output

the

three

eigenvalues are

are requested

with

a tolerance

oflO-G,

the

eigenvalues

AO= Al= Az= The exact values are 25/4, and its derivative requires eigenvalues, problems. [1] required tolerance; of

6.2499993, 2.2499995, 0.2500000. Output the wide for the zeroeth range in scale of instability the at the for the classificaIn contrast,

eigenfunction the answers and underflow tion, this As problem

9/4, and 1/4. is in Table II. Note times were

which

care in the shooting Execution and 1.6 for the

algorithm 0.2 seconds eigenfunction.

to avoid

1.9 for the requested an

code SLEIGN

69.8 seconds just to get the three eigenvalues took 9.6 seconds. the NAG code SL02FM spectral density functions, consider

example

calculating

u on [1, CO)with Au(1) This problem has continuous

u =Au 4X2

(20)

+ u(l)

= O. a single eigenvalue AO =

spectrum

(O, ~) with

0.0222989949. The spectral density function can be found exactly [8] in terms of various Bessel functions. In Table III is found the computed approximations to p(t) and their errors at many t points. The requested tolerance was 10-5. For this problem a total of 153,960 eigenvalues and eigenfunction norms were computed; 147,005 of the eigenvalues were found using asympACM Transactions on Mathematical Software, Vol. 19, No. 3, September 1993.

372

S. Pruess and C. T. Fulton


Table II. Eigenfunctions for a Morse u~(x) Potential

x 4.0 2.0 1.0 0.5 0.0 1.0 2.0 4.0 8.0 16.0

U13(x)

0.3E 65 0.6E 06 0.063009 0.446734 0.896167 0.490041 0.080812 0.000774 0.4E07 0.8E16

0.5E 63

0.000012
0.356308 1.092784 0.448084 0.684274 0.169219 0.001891 0.9E07 0.2E15

Table

III.

p(t)

Output

for Equation

20

t
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.5 2.0 5.0 10.0 20.0 50.0 100.0 200.0 500.0 1000.0 2000.0 5000.0 10000.0 50000.0
ACM Transact~ons on Mathematical

output

p(t)

error +0.000000 +0.000012 +0.000010 +0.000004 +0.000004 +0.000006 +0.000004 +0.000005 +0.000004 +0.000004 +0.000004 +0.000001 +0.000000 +0.000002 +0.000001 +0.000000 +0.000000 0.000001 0.000001 0.000001 +0.000000 0.000003 0.000013 0.000017 0.000019 0.000019 0.000019
N0.3, September 1993.

(tolerance = 0.00001) 0.178038 0.247217 0.298865 0.339436 0.372984 0.401560 0.426392 0.448278 0.467790 0.485340 0.501248 0.515761 0.529073 0.563256 0.606740 0.731127 0.804438 0.859708 0.910493 0.936524 0.955050 0.971549 0.979888 0.985784 0.991016 0.993653 0.997172
Software, Vol 19,

Mathematical
Table IV. p(t)

Software for Sturm-Liouville


for the Gelfand-Levitan Potential

Problems

373

t
0.000 0.100 0.200 0.300 0.400 0.600 0.800 0.950 1.020 1.200 1.400 1.700 2.000 2.500

SLEDGE p(t) (tolerance = 0.001) 0.0000 0.4016 0.5686 0.6966 0.8041 0.9850 1.1377 1.2407 3.2892 3.3954 3.5072 3.6608 3.8014 4.0139

exact

p(t)

0.0000 0.4026 0.5694 0.6974 0.8053 0.9862 1.1388 1.2410 3.2859 3.3945 3.5065 3.6601 3.8006 4.0132

totic

formulas.

The

remaining

6,955

were

found

by

the

shooting

method

described earlier; the total time required was 2,102 seconds. The next example is the potential of Gelfand and Levitan [11]: u with u(o) where T= This problem has only 1 +x/2 + sin2x/4. at A = 1 which is embedded in the + u(o) = o + 2{ Tsin2x + cos4 x}/T2u = Auon(O, ~)

one eigenvalue

continuous spectrum of (O, ~). We expect to see an increasing spectral density function p(t) for t >0 with a pronounced jump at t = 1 (from [11] the magnitude of the jump is 2). Selected computed approximations for tolerances of 0.001 are displayed in Table IV. Altogether, 513 seconds of computer time were required. This problem is especially difficult because the oscillatory, slowly decaying potential requires small step sizes over a long range; also, the discontinuity in p(t) takes considerable effort to resolve within the requested 2 + 4fi/7r accuracy. for 1< The exact
p(t)

from

[11] [0, 2.5]. different

is 4fi/mcomputed

for

O < t < 1 and p(t) using 126

t. Figure

1 is a plot

of the

equally spaced t-values in the interval (taken from [20]) normalization of p(t) quently, facilitate the exact answer comparisons.
ACM

Note that the code uses a from that in [11]; conse(doubled) in order to

from

[111 has been

adjusted

Transactions

on Mathematical

Software,

Vol

19, No. 3, September

1993.

374

S. Pruess and C. T. Fulton

4 35 3 2,5 Fig. 1. P(t) for GelfandLevitan potential. 2~ 1.5


1.

0.50 0 5

0.5

15

Table

Timing/Reliability Requested Accuracy 1.E 03 2.2 Time

Results

for Hydrogen Absolute Error 0.08E

Atom

Model

Actual

03

1.E 04 1.E 05 1.E 06 1.E 07 1.E 08 1.E 09 1.E 10 1.E 11 1.E 12 1.E 13

3.8 5.6 7.8 9.6 15.9 19.9 27.1 34.2 41.3 49.8

0.04E 04 0.04E 05 0.04E 06 0.04E 07 O.llE 08 0.04E 09 0.04E 10 0.14E 11 0.33E 12 0.50E 13

The

final

example

illustrates

the

dependence

of

the

execution

time

on the accuracy requested, and the reliability of the code in achieving this requested accuracy. We have chosen the simple model (see p. 98 of [20]) of the hydrogen atom given by (1) with p(x) = r(x) = 1 and
q(x)= on [0, ~) for which it is known that Ah = We used SLEDGE to estimate 1/(2h the first + 4)2. 10 eigenvalues with input toler12 z+~

ances Table

data is summarized in of 1.E 03, I.E 04, ..., 1.E 13. The output V; the final column is the maximum over k (O < k < 9) of the actual

ACM Transactions on Mathematical Software, Vol. 19, No. 3, September 1993

Mathematical absolute SLEDGE finer ones. error in the output conservative

Software for Sturm-1-iouville Problems to A~. Note that for this but

375

approximation

problem

is fairly

over the coarser

tolerances,

less so at the

ACKNOWLEDGMENT

We are grateful

to Yuantao

Xie

for

his

assistance

(both

mathematical

and

computational) on this project. We also thank John Pryce and Alan Andrew for their careful reading of the manuscript and for the several changes they suggested.

REFERENCES
1. BAILEY, problem. 2. BAILEY, package Cliffs, 4. FIX, G. 519-525. 5. FULTON, 6. FULTON, boundary 7. FULTON, Liouville Focused National report, Submitted 11. GELFAND, spectral Comput. 13. MCNABB, 741-755. 14. PRums,
differential S. Estimating equation. the eigenvalues of Sturm-Liouville problems by approximating the

P.,

GORDON, Trans.

M., Math.

AND SHAMPINE, Sofko. H., problems. G. Ordinary 4 (1978),

L.

Automatic 193-208. A.

solution 700:

of

the

Sturm-Liouville software Englewood 19 (1967), in the

ACM

P., GARBOW, B., KAPER, for Sturm-Liouville G., AND ROTA, N.J., 1969. eigenvalues boundary Proc. eigenvalue Proc.

AND ZETTL,

Algorithm

A FORTRAN

ACM

Trans. Math.

Softw.

17 (1991), 500-501.
Prentice-Hall, Anal. parameter 293-308. contained for regular in Appl.

3. BIRKHOFF,

differential

equations. systems. with

Asymptotic C. C. Two-point

of Sturm-Liouville value problems Edinburgh, with

J. Math.

eigenvalue

contained

the boundary

condition. Singular

Roy. Sot.

Sect. A, 77 (1977), eigenvalue parameter 1-34. asymptotic SPDNSF. Value 1989, Div., Sect. A, 87 (1980)

problems Edinburgh, and

condition. problems. Research Laboratory 1989.

Roy. Sot. in on

C., AND PRUESS, S. To appear Program

Eigenvalue

eigenfunction Appl.

Sturmof the Argonne NSF final

J. Math.
guide and Spectral

Anal. Theory

8. FULTON, C., AND PRUESS, S.

A users

to the subroutine and Sciences

In Proceedings Problems. 77-102. problems.

Boundary

Mathematical

Computer software

9. FULTON, C., AND PRUESS, S.

Mathematical

for Sturm-Liouville classification

10. FULTON, C., PRUESS, S., AND XIE, Y. for publication. I., AND LEWTAN, Am. Math. B. Sot. On

The automatic the

of Sturm-Liouville equation SIAM

problems. from its

determination 1 (1955), meshes Asymptotic coefficients.

of a differential 253304. with constraints. behavior

function. 1 (1980),

Transl.

12. KAUTSKY, J., AND NICHOLS, N. 499-511.

Equidistributing

J. Sci. Slat.
of a

A., ANDERSON, R., AND LAPWOOD, E. system with discontinuous

of the Anal.

eigenvalues Appl.

Sturm-Liouville

J. Math.

1 (1976),

SIAM
linear

J. Numer.
boundary 551-561.

Anal.
value

10 (1973), 55-68.
problems by approximating the coefficients.

15. PRUESS, Math. Phys.

S.

Solving

Comput. 75 (1988),

27 (1973), 493-497.

16. PRUESS, S.

On shooting

algorithms

for calculating An asymptotic for publication. shooting multipurpose 1989. on Mathematical

Sturm-Liouville numerical methods software

eigenvalues. method

J. Comput.

17. PRUESS, S., XIE, Y., AND FULTON, C. Sturm-Liouville 18. PRYCE, J. Error problems. control Submitted

for a class of singular problems. and

of phase-function M. A new Preprint,

for

Sturm-Liouville for

IMA J. Numer.
Sturm-Liouville

Anal.

6 (1986), 102-123.
package Schrodinger

19. PRYCE, J., AND MARLETTA,


computations. ACM

TransactIons

Software,

Vol. 19, No. 3, September

1993.

376

S. Pruess and C. T. Fulton

20. TITCHMARSH, tzons, I. 2nd 21. WYNN, P. 10 (1956),

Ezgenfunction

Expansions Press, the

Associated London, en(Sm)

z.uzth Second

Order Math,

Dzfferentlal Tables Aid

Equa Comput.

Ed , Oxford On a device

University for computing

1962. transformation.

91-96.

Received

November

199 1; revised

June

1992;

accepted

November

1992

ACM

Transactions

on

Mathematmal

Software,

Vol

19,

No

3, September

1993

S-ar putea să vă placă și