200
Appendix
where we have used the relation
sin z =
e
iz
− e
−iz
2i
.
(A.16)
Substituting then (A.15) into (A.14) and comparing with the asymptotic form (2.63),
we obtain the result
˜
A l = (2l + 1)i
l
/k.
(A.17)
A.4 Elimination method
Irig1 REPEAT FOR GOING FROM 1 TO n-1
VNORM=vara (irig1,irig1)
varb(irig1)=varb(irig1)/VNORM
REPEAT FOR ICOL GOING TO BE A n irig1
vara (irig1, ICOL) = vara (irig1, ICOL) / VNORM
END REPEAT ICOL
REPEAT FOR irig2 GOING TO BE A n +1 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)
IF (irig1.ne.n) THEN
REPEAT FOR ICOL GOING TO BE A n +1 irig1 OF STEP -1
sum = sum - vara (irig1, ICOL)
END REPEAT ICOL
END IF
varX (irig1) = sum
END REPEAT irig1
One sees immediately that in this simple form, the algorithm can give us problems
because there are situations where the VNORM the variable is zero or nearly zero.
The above procedure works (stable) well if the matrix is diagonally dominate or
positive definite.
A better procedure is to use partial pivoting which selects the largest absolute
value of the column which generally reduces roundoff error. The modified pseudo
code is as follows:
Précédent

- 212/219

Suivant