Skip to content

An exponentially convergent numerical solver for Sturm-Liouville problems.

License

Notifications You must be signed in to change notification settings

imathsoft/legendrefdnum

Repository files navigation

legendrefdnum

legendrefdnum is a Python 2.x module for solving Sturm-Liouville problems of the type

-\frac{d}{d x}\left[(1-x^{2})\frac{d u(x)}{d x}\right]+q(x)u(x)=\lambda u(x),\quad x\in(-1, 1),

\lim\limits_{x\rightarrow \pm 1}(1-x^{2})\frac{d u(x)}{d x}=0.

It has been proved to be exponentially convergent for

|q|{1, \rho}=\int\limits{-1}^{1}\frac{|q(x)|}{\sqrt{1-x^{2}}}d x<\infty.

The module was developed based on the algorithm published in the article Volodymyr L. Makarov, Denys V. Dragunov, Danyil V. Bohdan. Exponentially convergent numerical-analytical method for solving eigenvalue problems for singular differential operators. A preprint of this article is available from http://arxiv.org/abs/1309.5795.

legendrefdnum comes extensively commented and with example code. You don't have to understand the FD-method to use legendrefdnum.

Running

The following modules are mandatory dependencies: numpy, scipy, matplotlib. Having mpmath installed is optional but highly recommended for calculations with dense meshes (see legendrepqwrappers.py for an explanation).

To run legendrefdnum on Ubuntu 12.04 or later do the following:

  1. Clone the GitHub repository.

  2. Execute the command sudo apt-get install python-numpy python-scipy python-mpmath python-matplotlib in the terminal.

  3. Run example1.py from the cloned repository to make sure everything works.

License

GNU LGPLv2.1+

About

An exponentially convergent numerical solver for Sturm-Liouville problems.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages