Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] aemw_v1_0.tar.gz(476 Kbytes)
Manuscript Title: High precision series solution of differential equations: Ordinary and regular singular point of second order ODEs.
Authors: Amna Noreen, Kåre Olaussen
Program title: seriesSolveOde1
Catalogue identifier: AEMW_v1_0
Distribution format: tar.gz
Journal reference: Comput. Phys. Commun. 183(2012)2291
Programming language: C++.
Computer: PC's or higher performance computers.
Operating system: Linux and MacOS.
RAM: Few to many megabytes (problem dependent)
Keywords: Second order ODEs, Regular singular points, Ordinary points, Frobenius method.
Classification: 2.7, 4.3.

External routines: CLN - Class Library for Numbers [1] built with the GNU MP library [2], and GSL - GNU Scientific Library [3] (only for time measurements).

Nature of problem:
The differential equation
-s2(d2/dz2 + (1 - ν+ - ν-)/z d/dz + (ν+ν-)/z2)ψ(z) + 1/z ΣNn-0vnznψ(z) =0,
is solved numerically to very high precision. The evaluation point z and some or all of the equation parameters may be complex numbers; some or all of them may be represented exactly in terms of rational numbers.

Solution method:
The solution ψ(z), and optionally ψ′(z), is evaluated at the point z by executing the recursion

Am+1(z) = s-2/(m+1+ν-ν+)(m+1+ν-ν-Nn-0Vn(z)Am-n(z),
ψ(m+1)(z)=ψ(m)(z) + Am+1(z),
to sufficiently large m. Here ν is either ν+ or ν-, and Vn(z) = vnzn+1.
The recursion is initialised by
A-n(z) = δn0zv, for n = 0,1,...,N
ψ(0)(z) = A0(z).

No solution is computed if z = 0, or s = 0, or if ν = ν- (assuming Reν+ ≥ Reν-) with ν+ - ν- an integer, except when v+ - v- = 1 and v0 = 0 (i.e. when z is an ordinary point for z-v-   ψ(z)).

Additional comments:
The code of the main algorithm is in the file seriesSolveOde1.cc, which "#include" the file checkForBreakOde1.cc. These routines, and the programs using them, must "#include" the file seriesSolveOde1.cc.

Running time:
On a Linux PC that is a few years old, evaluating the ground state wavefunction of the anharmonic oscillator (with the eigenvalue known in advance), cf. equation (6), at y = √10 to P = 200 decimal digits accuracy takes about 2 milliseconds, to P = 100000 decimal digits accuracy takes about 40 minutes.

[1] B. Haible and R.B. Kreckel, CLN - Class Library for Numbers, http://www.ginac.de/CLN/
[2] T. Granlund and collaborators, GMP - The GNU Multiple Precision Arithmetic Library, http://gmplib.org/
[3] M. Galassi et al, GNU Scientific Library Reference Manual (3rd Ed.), ISBN 0954612078., http://www.gnu.org/software/gsl/