Numerical Solution of Linear Ordinary Differential Equations in Quantum Chemistry by Spectral Method

The problem of the structure of hydrogen atom is the most important problem in the field of atomic and molecular structure. Bahr’s treatment of the hydrogen atom marked the beginning of the old quantum theory of atomic structure, and wave mechanics had its inception in Schrodinger ‘s first paper, in which he gave the solution of the wave equation for the hydrogen atom. Since the most differential equations concerning physical phenomenon could not be solved by analytical method hence, the solutions of the wave equation are based on polynomial (series) methods. Even if we use series method, some times we need an appropriate change of variable, and even when we can, their closed form solution may be so complicated that using it to obtain an image or to examine the structure of the system is impossible. For example, if we consider Schrodinger equation, i.e., 砿嫗嫗 + 岫に兼継h貸態 − 糠態捲態岻砿 = ど,


Introduction
The problem of the structure of hydrogen atom is the most important problem in the field of atomic and molecular structure.Bahr's treatment of the hydrogen atom marked the beginning of the old quantum theory of atomic structure, and wave mechanics had its inception in Schrodinger 's first paper, in which he gave the solution of the wave equation for the hydrogen atom.Since the most differential equations concerning physical phenomenon could not be solved by analytical method hence, the solutions of the wave equation are based on polynomial (series) methods.Even if we use series method, some times we need an appropriate change of variable, and even when we can, their closed form solution may be so complicated that using it to obtain an image or to examine the structure of the system is impossible.For example, if we consider Schrodinger equation, i.e., we come to a three-term recursion relation, which work with it takes, at least, a little bit time to get a series solution.For this reason we use a change of variable such as or when we consider the orbital angular momentum, it will be necessary to solve As we can observe, working with this equation is tedious.Another two equations which occur in the hydrogen atom wave equations, are Legendre and Laguerre equations, which can be solved only by power series methods.
In next section, after a historical review of spectral methods we introduce Clenshaw method, which is a kind of spectral method, and then solve such equations in last section.But, first of all, we put in mind that this method can not be applied to atoms with more electrons.With the increasing complexity of the atom, the labour of making calculations increases tremendously.In these cases, one can use variation or perturbation methods for overcoming such problems.

Historical review
Spectral methods arise from the fundamental problem of approximation of a function by interpolation on an interval, and are very much successful for the numerical solution of ordinary or partial differential equations.Since the time of Fourier (1882), spectral representations in the analytic study of differential equations have been used and their applications for numerical solution of ordinary differential equations refer, at least, to the time of Lanczos.
Spectral methods have become increasingly popular, especially, since the development of Fast transform methods, with applications in problems where high accuracy is desired.
Spectral methods may be viewed as an extreme development of the class of discretization schemes for differential equations known generally as the method of weighted residuals (MWR) (Finlayson and Scriven (1966)).The key elements of the MWR are the trial functions (also called expansion approximating functions) which are used as basis functions for a truncated series expansion of the solution, and the test functions (also known as weight functions) which are used to ensure that the differential equation is satisfied as closely as possible by the truncated series expansion.The choice of such functions distinguishes between the three most commonly used spectral schemes, namely, Galerkin, Collocation(also called Pseudospectral) and Tau version.The Tau approach is a modification of Galerkin method that is applicable to problems with non-periodic boundary conditions.In broad terms, Galerkin and Tau methods are implemented in terms of the expansion coefficients, where as Collocation methods are implemented in terms of physical space values of the unknown function.
The basis of spectral methods to solve differential equations is to expand the solution function as a finite series of very smooth basis functions, as follows in which, one of our choice of  n , is the eigenfunctions of a singular Sturm-Liouville problem.If the solution is infinitely smooth, the convergence of spectral method is more rapid than any finite power of 1/N.That is the produced error of approximation (1), when N  , approaches zero with exponential rate.This phenomenon is usually referred to as "spectral accuracy".The accuracy of derivatives obtained by direct, term by term differentiation of such truncated expansion naturally deteriorates.Although there will be problem but for high order derivatives truncation and round off errors may deteriorate, but for low order derivatives and sufficiently high-order truncations this deterioration is negligible.So, if the solution function and coefficient functions of the differential equation are analytic on [,] ab, spectral methods will be very efficient and suitable.We call function y is analytic on [,] abif is infinitely differentiable and with all its derivatives on this interval are bounded variation.

Clenshaw method
In this section, we are going to introduce Clenshaw method.For this reason, first we consider the following differential equation: where

Lf
x D , and i f ,  , ,..., , iM f , are known real functions of , i x D denotes th i order of differentiation with respect to  , x is a linear functional of rank M and  M C .
Here (3) can be initial, boundary or mixed conditions.The basis of spectral methods to solve this class of equations is to expand the solution function, y , in ( 2) and (3) as a finite series of very smooth basis functions, as given below where,   N n Tx is sequence of Chebyshev polynomials of the first kind.By replacing N y in (2), we define the residual term by N rx as follows In spectral methods, the main target is to minimize N rx , throughout the domain as much as possible with regard to (3), and in the sense of pointwise convergence.Implementation of these methods leads to a system of linear equations with  N equations and  N unknowns , ,..., .

N aa a
The Tau method was invented by Lanczos in 1938.The expansion functions   , , ,... First, for an arbitrary natural number N , we suppose that the approximate solution of equations ( 6) is given by (4).Our target is to find  , ,..., t N aa a a .For this reason, we put .
Using this fact that the Chebyshev expansion of a function  , , we can find coefficients   , ii and  i as follows: where,  c and 1 To compute the right-hand side of (8) it is sufficient to use an appropriate numerical integration method.Here, we use where, notation  " means first and last become half .Therefore, we will have : Now, substituting (4) and ( 9) in equations ( 6), and using the fact that where, ,when  ij , and zero when  ij .
We can also compute the integrals in the right-hand side of ( 12) by the method of numerical integration using  N -point Gauss-Chebyshev-Lobatto quadrature.Therefore, substituting ( 13) in ( 12) and using the fact that   , i i T equations ( 12) and ( 11

Numerical examples
As we mentioned the important problem in the field of atomic and molecular structure, is solution of wave equation for hydrogen atom.In this section we will solve Schrodinger, Legendre and Laguerre equations, which occur in the hydrogen atom wave equations, by Clenshaw method and observe the power of this method comparing with usual numerical methods such as Euler's or Runge-Kutta's methods.We start with Schrodinger's equation.
Here interval is chosen as [0,1], but using change of variable such as = we can transfer interval We solve this equation by Clenshaw method and compare the results for different values of N. The results for N=4, 7, 10, 13, respectively, were: . × , .9 × , .9 × , .× .

www.intechopen.com
Numerical Solution of Linear Ordinary Differential Equations in Quantum Chemistry by Spectral Method 9 As we expected when N increases, errors decrease.
Since our solution is a polynomial then for > , we come to a solution with error very closed to zero.If such cases you find the error is not zero but closed to it, is because of rounding error.We must put in our mind that the results by this method will be good if the exact solution is a polynomial.
We end this section by solving Laguerre's equation.Here we have again a polynomial solution, so we expect a solution with very small error.We examined for different values of N such as N=2, 3 and get the results 0 and × , respectively.
Results in these examples show the efficiency of Clenshaw method for obtaining a good numerical result.
In case of singularity, one can use pseudo-spectral method.Some papers also modified pseudo-spectral method and overcome the problem of singularity even if the solution function was singular.
be elements of a complete set of orthonormal functions.The approximate solution is assumed to be expanded in terms of those functions as applied.Here we are going to use a Tau method developed by Clenshaw for the solution of linear ODE in terms of a Chebyshev series expansion.Consider the following differential equation: