Professional Documents
Culture Documents
Matrix Norm
Matrix Norm
If A.x = b then A(x+x) = b+b. Since we are dealing with a set of linear equations,
A. x = b.
A.xi = i xi
A -1 c i x i x iT
i
A.A -1 c i A.x i x Ti 1
i
c i i x i x iT 1
i
xx
i
i
T
i 1
The last equation holds provided the vectors xi are complete and orthonormal and so ci
i =1 for all i and ci =1/i.
1
A -1 x i x iT
i i
Now consider x = A-1.b. Rewrite this as
1
x x i x iT .b and we see that the error term, b, is projected onto xi with
i i
coefficient 1/i xiT.b. The largest contribution to x will come from eigenvectors
with the smallest eigenvalues and those for which b and xi are nearly parallel.
Nearly singular matrices will be most sensitive since they have the smallest
eigenvalues.
Relative error
The error x will depend on both the direction and magnitude of b. It makes more
sense therefore to compare the relative change ||b||/||b|| with the relative error ||x ||/||
x||. For a positive definite matrix (all eigenvalues positive) the solution vector and
error term always satisfy:
This is a measure of the amplifying power of A and replaces ||x||/||x|| when A is not
symmetric. In this case the condition number is
c = ||A|| ||A-1||
To see why this is an appropriate definition for the condition number, replace A-1 by
its expansion in eigenvectors and eigenvalues above. The relative error satisfies
||x||/||x|| c ||b||/||b||
as before.
If we consider the effect of an error in the elements of A instead of the vector b then
we find, perhaps surprisingly, that the same definition of condition number satisfies
||x||/||x|| c ||A||/||A||
(A+A).(x+x) = b
A.x+A.x+A.x = 0
x = -A-1.A.(x+.x) = 0
||x|| = ||A-1||.||A||.||(x+.x)||
||x||/||x+x || ||A-1||.||A|| = c ||A||/||A||
Round off error therefore comes from: natural sensitivity, c, and the actual errors in A
and b.
For the case of an eigenvalue problem the relevant condition number is that of the
eigenvector matrix, S, not A. For the eigenvalue problem A.S = S. with an error
A in A
(A+A).S = S.(+ )
A.S = S.
= S-1.A.S
|||| = ||S-1||.||A||.||S|| = c ||A||
Gamma function
See any text in mathematical physics, e.g. Mathematical methods for physicists,
Arfken and Weber.
lim 1.2.3. n
(z) n z z 0, - 1, - 2 , - 3
n z(z 1)(z 2) (z n)
lim 1.2.3. n
(z 1) n z 1 z - 1, - 2 , - 3
n (z 1)(z 2)(z 3) (z 1 n)
lim nz 1.2.3. n
n z z 0, - 1, - 2 , - 3
n z n 1 z(z 1)(z 2) (z n)
(z+1) = z (z)
(1) = 1.(0) = 1
(2) = 1.(1) = 1
0
(1/2) = 2 e - t dt 2 erf()
2
0
The utility of the incomplete gamma function lies in the fact that multiplying an
expression by ((z,x)+(z,x))/(z) leaves it unchanged and the two parts generated in
this way may be, rapidly convergent, e.g., when the original expression is not.
Functions such as the gamma functions are generally computed numerically using
either asymptotic series (which may converge rapidly for large or small arguments of
the function) and recursion relations.
By expanding the exponential in the incomplete gamma function and integrating term
by term we obtain
x
(z, x) = e - t t z -1 dt Re(z) > 0
0
z 1
xs
(z 1)!(1 e x )
s 0 s!
(z, x) = e - t t z -1 dt Re(z) > 0
x
z 1
xs
(z 1)!e x
s 0 s!
2 x 1
2
erf(x) e - t dt (1/2, x 2 )
0
2 1
2
erfc(x) e -t dt (1/2, x 2 )
x
erfc(x) is known as the complementary error function and for all arguments
erf(x) + erfc(x) = 1
2
1.5
0.5
-4 -2 2 4
-0.5
-1
Plot of erf(x) (rising from -1 to 1), erfc(x) (falling from 2 to zero) and erf(x) +
erfc(x) (constant value of 1).
2 x3 x5 x 2n 1
x ... 1 ...
n
erf(x)
3 5.2! (2n 1)n!
2
e -x 1 1.3 1.3.5 n (2n - 1)!!
erf(x) 1 - 1 2
2 4 3 6 ... 1 n 2n
...
x 2x 2 x 2 x 2 x
The first expansion is obtained simply by expanding e -t^2 and integrating erf(x) term
by term. The second is obtained by writing
2 1 2 1 d 1 -t 2
e - t te - t - e
t t dt 2
and integrating by parts. The first expansion is good for small x and the second for
large x.
The incomplete gamma functions satisfy the following upwards and downwards
recursion relations
(z, x) (z 1)(z 1, x) e x x z 1
(z, x) (z 1) (z 1, x) e x x z 1
(z 1, x) e x x z
(z, x)
z
(z 1, x) e x x z
(z, x)
z
The first two are upwards and the last two downwards and the relations can be
obtained using integration by parts. The starting points for the downwards
recurrences are
e x
for z 0
(1 z, x)
( 1) m x 1 z m
m!(1 z m) for 0 z 1
m 0
1 e x for z 0
(1 z, x)
(1 z, x) - (1 z, x) for 0 z 1
r i a1 j a 2 k a 3 denotes ijk
G h b1 k b 2 b 3 denotes hk
(1)
' i j k
where the primed sum indicates that the self term i = j = k = 0 is omitted. Write this
formally as an integral over all space. Define
'
w(r )
( 1) i j k (r r )
ik 1/2 .r 1
'
w(r ) e (r r ) k 1/2
(b 1 , b 2 , b 3 )
2
using a i .b j 2 ij (definition of reciprocal lattice)
1
(1,0,0) k 1/2 .r (b 1 .a1 ) e i - 1
2
w(r )dr w(r )erf( r) dr w(r )erfc( r) dr
r
r
r
w(r )dr w(r )erf( r) dr w(r )erfc( r) dr
r
r
r
w(r )erf( r) dr
r
1
(h h
'
k 1/2 ) - 1 e h 2
dh
2
- h k 1/2
1 e
'
2
h k 1/2
2
2
i j k - h k 1/2
(-1) 1 e
' '
erfc( r )
2
r h k 1/2
2
d du
p(x) q(x)u(x) w(x)u(x)
dx dx
1 2
2 (r, , t) 0
c 2 t 2
1 1 2
(r, , t) R(r)( )T(t) 2 r 2
r r r r 2
1 1 1
R(r)( )T' ' (t) R' ' (r)( )T(t) R' (r)( )T(t) 2 R(r)' ' ( )T(t)
c2 r r
1 T' ' (t) R' ' (r) 1 R' (r) 1 ' ' ( )
2 -2
c2 T(t) R(r) r R(r) r ( )
T' ' (t) 2 c 2 T(t) 0
R' ' (r) R' (r) ' ' ( )
r2 r 2 r 2 - n 2
R(r) R(r) ( )
' ' ( ) n 2 ( ) 0
r 2 R' ' (r) r R' (r) 2 r 2 n 2 R(r) 0 or
r
d
r R' (r) 2 r 2 n 2 R(r) 0 Bessel' s equation
dr
R(r) A J n (r) B Yn (r)
Recurrence relations and zeroes of Bessel functions
Jn and Yn are Bessel functions of the first and second kinds, respectively. Jn is finite at
the origin (Jn(0) = 1) while Yn is divergent. For a vibrating drumhead, we impose the
boundary conditions, R(0) = finite, R(1) = 0 (assume drumhead has unit radius). Then
B = 0 and the solution to the ode is a linear combination of Bessel functions of the
first kind. The allowed solutions will have Bessel function zeroes at r = 1. Let the m th
zero of the nth Bessel function be denoted kmn.
The first three Bessel functions of the first kind are plotted below. The function
which takes the value one at the origin is J0[x]. J1(x) and J2(x) have value zero at the
origin and J1 is more tightly curved than J2.
Bessel Jn x
1
0.8
0.6
0.4
0.2
x
2.5 5 7.5 10 12.5 15
-0.2
-0.4
m/n 0 1
1 2.4048 3.8318
2 5.5201 7.0516
3 8.6537 10.1735
n=0 n=1
Radial nodal positions for corresponding modes on drumhead
m/n 0 1
1 1.0000 1.0000
2 0.4356 0.5461
3 0.2778, 0.6378 0.3766, 0.6895
x 1
(h )
e2 h m J (x)h m
m
m
x 1 m m
1 2 J m (x)h m J m (x)mh m-1
2 h m m
2m 1
J m (x)h m-1 1 2 J m (x)h m J m (x)h m J m (x)h m-2
x h
2m
J m (x) J m 1 (x) J m-1 (x)
x
2m
J m-1 (x) J m (x) J m 1 (x) Downwards recurrence relation
x
m
lim 1 ex
Initialise recursive process with J m (x) for m x
m 2m 2m
To obtain zeroes of Bessel functions use Newton - Raphson
J (x ) m d
x n 1 x n - 'm n J 'm (x n ) J m (x) - J m 1 (x) also from generating function
J m (x n ) x dx
2m
J m-1 (x) J m (x) J m 1 (x) Downwards recurrence relation
x
m
J 'm (x n ) J m (x) - J m 1 (x) For calculating zeroes from Newton - Raphson
x
Legendre polynomials and Laplaces equation in spherical polar coordinates
1 ( )
sin n(n 1)( ) 0
sin
Let x cos sin 1 - x 2 equation in becomes
d d
(1 x 2 ) P n (x) n(n 1)P n (x) 0 in the standard Sturm - Liouville form
dx dx
Solutions are the Legendre polynomials given by Rodrigues formula
n
1 d
P n (x) n ( x 2 1) n
2 n! dx
(x t )
( x t ) n 0 Pn (x)t n (1 2xt t 2 )n 0 Pn (x)nt n -1
n n
(1 2xt t )2 1/2
(1 2xt t )
2 1/2
(2n 1)x n
Pn 1 (x) Pn (x) - P (x)
(n 1) n 1 n -1
Pn' 1 (x) Pn' -1 (x) 2xPn' (x) Pn (x)
The first two Legendre polynomials are P0(x) = 1 and P1(x) =x so these may be used
to calculate higher Legendre polynomials using the recurrence relation.
double result ;