2.5 Numerical Applications
77
VNORM = vara (irig1, irig1) / vara (irig2, irig1)
varb (irig2) = varb (irig2) * VNORM-varb (irig1)
REPEAT FOR ICOL GOING TO BE A n irig2
vara (irig2, ICOL) = vara (irig2, ICOL) *
VNORM-vara (irig1, ICOL)
END REPEAT ICOL
END REPEAT irig2
END REPEAT irig1
REPEAT FOR irig1 GOING TO PASS n 1 -1
sum = varb (irig1)
REPEAT FOR ICOL GOING TO BE A n irig1 OF STEP -1
sum = sum + vara (irig1, ICOL)
END REPEAT ICOL
varX (irig1) = sum
END REPEAT irig1
A popular algorithm for solving a system of linear equations is the elimination
method (see Appendix A4).
2.5.2 The Structure of the Wave Functions
The closed-form solution of the Schrödinger equation offers us the formal instrument
to define the properties of the wave functions for systems with two interacting bodies.
In order to understand the structure of such functions, it is useful (and sometimes
necessary) to study the zeroes of the function as well as its maximum, minimum,
flex points, and so on. In the example below, we see a very simple algorithm for the
numerical search of the zero points, the minima and maxima of an arbitrary function.
We will assume for this purpose that the function has been well defined as a dense
grid of points and stored in a vector V ALF(s)
INPUT xin, xfin, n
dx=(xfin-xin)/(n-1)
x=xin-dx
ISTEP REPEAT FOR GOING FROM 1 TO n
x=x+dx
f(x_istep)=calculation of the value of the function x_{ISTEP}
END REPEAT ISTEP
ISTEP REPEAT FOR GOING FROM 2 TO n-1
IF(f(x_istep)*f(x_{ISTEP+1}<0)
PRINT ‘zero range’, x_istep, x_{+1} ISTEP
IF(f(x_istep)>f(x_{1}-ISTEP.And.f(x_istep)>
f(x_{+1}ISTEP) PRINT ‘max range’,ISTEP-x_{1}, x_{ISTEP+1}
77
VNORM = vara (irig1, irig1) / vara (irig2, irig1)
varb (irig2) = varb (irig2) * VNORM-varb (irig1)
REPEAT FOR ICOL GOING TO BE A n irig2
vara (irig2, ICOL) = vara (irig2, ICOL) *
VNORM-vara (irig1, ICOL)
END REPEAT ICOL
END REPEAT irig2
END REPEAT irig1
REPEAT FOR irig1 GOING TO PASS n 1 -1
sum = varb (irig1)
REPEAT FOR ICOL GOING TO BE A n irig1 OF STEP -1
sum = sum + vara (irig1, ICOL)
END REPEAT ICOL
varX (irig1) = sum
END REPEAT irig1
A popular algorithm for solving a system of linear equations is the elimination
method (see Appendix A4).
2.5.2 The Structure of the Wave Functions
The closed-form solution of the Schrödinger equation offers us the formal instrument
to define the properties of the wave functions for systems with two interacting bodies.
In order to understand the structure of such functions, it is useful (and sometimes
necessary) to study the zeroes of the function as well as its maximum, minimum,
flex points, and so on. In the example below, we see a very simple algorithm for the
numerical search of the zero points, the minima and maxima of an arbitrary function.
We will assume for this purpose that the function has been well defined as a dense
grid of points and stored in a vector V ALF(s)
INPUT xin, xfin, n
dx=(xfin-xin)/(n-1)
x=xin-dx
ISTEP REPEAT FOR GOING FROM 1 TO n
x=x+dx
f(x_istep)=calculation of the value of the function x_{ISTEP}
END REPEAT ISTEP
ISTEP REPEAT FOR GOING FROM 2 TO n-1
IF(f(x_istep)*f(x_{ISTEP+1}<0)
PRINT ‘zero range’, x_istep, x_{+1} ISTEP
IF(f(x_istep)>f(x_{1}-ISTEP.And.f(x_istep)>
f(x_{+1}ISTEP) PRINT ‘max range’,ISTEP-x_{1}, x_{ISTEP+1}
