184 6 Linear Algebra
and
uN+ 1 =−^2
π
N
∑
j= 1
k^20 ωj
(k^20 −k^2 j)/m
. (6.31)
The first task is then to set up the matrixAfor a givenk 0. This is an(N+ 1 )×(N+ 1 )matrix.
It can be convenient to have an outer loop which runs over the chosen observable values
for the energyk^20 /m.Note that all mesh pointskjforj= 1 ,Nmust be different fromk 0. Note
also thatV(ki,kj)is an(N+ 1 )×(N+ 1 )matrix.
- With the matrixAwe can rewrite Eq. (6.28) as a matrix problem of dimension(N+ 1 )×
(N+ 1 ). All matricesR,AandVhave this dimension and we get
Ai,lRl,j=Vi,j, (6.32)
or just
AR=V. (6.33)
- Since we already have definedAandV(these are stored as(N+ 1 )×(N+ 1 )matrices) Eq.
(6.33) involves only the unknownR. We obtain it by matrix inversion, i.e.,
R=A−^1 V. (6.34)
Thus, to obtainR, we need to set up the matricesAandVand invert the matrixA. With the
inverseA−^1 we perform a matrix multiplication withVand obtainR.
WithRwe can in turn evaluate the phase shifts by noting that
R(kN+ 1 ,kN+ 1 ) =R(k 0 ,k 0 ), (6.35)
and we are done.
6.4.4.2 Inverse of the Vandermonde Matrix
In chapter 3 we discussed how to interpolate a functionfwhich is known only atn+ 1 points
x 0 ,x 1 ,x 2 ,...,xnwith corresponding valuesf(x 0 ),f(x 1 ),f(x 2 ),...,f(xn). The latter is often a typi-
cal outcome of a large scale computation or from an experiment. In most cases in the sciences
we do not have a closed-form expression for a functionf. The function is only known at spe-
cific points.
We seek a functional form for a functionfwhich passes through the above pairs of values
(x 0 ,f(x 0 )),(x 1 ,f(x 1 )),(x 2 ,f(x 2 )),...,(xn,f(xn)).
This is normally achieved by expanding the functionf(x)in terms of well-known polynomials
φi(x), such as Legendre, Chebyshev, Laguerre etc. The function isthen approximated by a
polynomial of degreen pn(x)
f(x)≈pn(x) =
n
∑
i= 0
aiφi(x),
whereaiare unknown coefficients andφi(x)are a priori well-known functions. The simplest
possible case is to assume thatφi(x) =xi, resulting in an approximation
f(x)≈a 0 +a 1 x+a 2 x^2 +···+anxn.
Our function is known at the pointsn+ 1 pointsx 0 ,x 1 ,x 2 ,...,xn, leading ton+ 1 equations of
the type