Homework

advertisement
10.34, Numerical Methods Applied to Chemical Engineering
Professor William H. Green
Lecture #8: Constructing And Using The Eigenvector Basis.
Homework
1) For those who haven’t programmed before – expect it to take time
2) If you get stuck and are beyond the point of learning, stop and move on. The
homework is a learning activity.
Matrix Definitions
A·wi = λi·wi
eigenvalue
of A
A·W = W·Λ
an eigenvector
of A
⎛#
⎜
⎜#
⎜#
⎝
w1
⎛ λ1
⎜
⎜0
⎜0
⎝
# #⎞
⎟
# #⎟
# # ⎟⎠
w2 w3
0
λ2
0
0⎞
⎟
0⎟
λ3 ⎟⎠
symmetric: come from second derivatives of scalars
i.e. Hessians H
ij
=
∂ 2V
are always symmetrical
∂xi ∂x j
all real symmetric matrices are ‘normal’
transpose (AT)* = AH (Hermitian conjugate)
of a complexconjugate
Square matrices (NxN)
A = URUH
U: unitary
if A = AT ‘symmetric’
if A = AH ‘Hermitian’
upper triangular (R)
if A·AH = AH·A ‘normal’
T
-1
if A = A
Schur decomposition: schur(A)
‘orthogonal’
A could be dense matrix
if AH = A-1 ‘unitary’
U has hermitian conjugate as inverse
If a real matrix is symmetric, it is also Hermitian.
For normal matrices A = W·Λ·WH
diagonal
A·W = W·Λ(WH·W)
eigenvectors & unitary
Back to eigenvalue problem
Hermitian matrices come up in quantum mechanics. All steady states in quantum
mechanics are hermitian eigenvalue problems. Unitary matrices also come up in quantum
mechanics and are basis transformations.
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical
Engineering, Fall 2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of
Technology. Downloaded on [DD Month YYYY].
∂ 2V
. Always symmetric, because of the equality of mixed partials.
∂x i ∂x j
Hessian matrix: H ij =
Because they are symmetric, they are also ‘normal’.
Similarity Transform
identity matrix
B(S-1wi) = S-1A(S·S-1)w = S-1A·w = S-1λiwi = λi(S-1wi)
A·wi = λiwi
B = S-1A S
‘B is similar to A”
A & B have the same eigenvalues
This is used in practice to calculate eigenvalues.
Find a diagonal matrix similar to A to find eigenvalues of A.
S2-1… S1-1A S1…S2 Æ Æ Λ
continue to add S and S-1
on each side and eventually
you will get at the eingenvalues
How to find S?
if you’re GOOD – find perfect S such that S·A·S = Λ
very difficult to find this S unless someone tells you the
eigenvector
In quantum mechanics people use matrices of 109 x 109
“You have to be very crafty to find the S of such a matrix.”
B = Q-1A·Q
A = Q·R
orthogonal
(Q
-1
T
=Q)
(B is similar to A)
-1
= (Q Q)R·Q = R·Q = B
upper
triangular
A(c·wi) = λi(c·wi)
(QR Algorithm is found in textbook
and is very complex)
does not matter how you scale, still get the same eigenvalue
eig(A) gives eigenvalues/vectors
(see help eig)
*Uses EISPACK, which is available from netlib
Why is this useful?
singular matrix Æ λi = 0
cond(A) = |λ|max/|λ|min
trace: tr(A) – sum of λi (Σ(λi) = Σaii)
Initial Conditions
Example Problem
dy
/dt = A·y
y(t=0) = y0
if A is normal
dy
/dt = WΛWHy
/dt(WHy) = Λ(WHy)
multiply both sides by WH
d
q(t) = WHy(t)
d
q0 = WHy0
/dt(q2) = λ2q2
dq
WH
/dt = Λq
dy
/dt = WHWΛWhy
d
/dt(q1) = λ1q1
q1 = q1,0eλ1t
look at initial conditions
Schur Decomposition
y(t) = W·q(t)
10.34, Numerical Methods Applied to Chemical Engineering
Prof. William Green
Lecture 8
Page 2 of 4
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical
Engineering, Fall 2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of
Technology. Downloaded on [DD Month YYYY].
⎛ q o1e λ1t ⎞
⎜
⎟
y (t ) = W ⎜ q o 2 e λ2t ⎟
⎜
⎟
⎝ # ⎠
Using ‘eig’ function you can get W
Sometimes things are asymmetrical so ‘eig’ function will give you a matrix. However, you
can always do Schur decomposition: A = URUH
If you do Schur you get: d/dt(WHy) = λ(WHy)
If A were not normal, use Schur: A = URUH
dy
/dt = U·R(UHy)
d
/dt(UHy) = Rq
(q)
dq
/dt = Rq
q
qlast(t) = qo,lasteλt
dq N −1
⎛ 0 " " "⎞
⎜
⎟
⎜ 0 0 " "⎟
R=⎜
⎟
⎜
⎟
⎜0 0 0 λ ⎟
⎝
⎠
= R N −1, N −1 q N −1 + R N −1, N q N (t )
dt
dq N −1
= R N −1, N −1 q N −1 + R N −1, N q N 0 e λt1
dt
can get this if you weren’t sleeping in ODE class
(this makes solution more difficult than EIG solution)
Quantum chemistry
Something more complicated
Hˆ Ψ ( x) = EΨ ( x)
interaction between
fundamental particles
Q ~ ∑ e − Ei / kbT
eigenvalues
of equation
(thermo)
Crafty Solution
Hˆ ∑ ciφi ( x) = E ∑ ciφi ( x)
Ψ(x)=Σciφi(x)
find these values that will solve Hψ = Eψ
integrate and multiply by φn*
∫ φ Hˆ (∑ c φ ( x)) = ∫ E (φ ∑ c φ ( x))
∑ c ∫ φ Hˆ φ = E ∑ c ∫ φ φ
*
*
n
i i
n
*
i
Property of orthonormal basis functions:
∫φ
φ i dx = δ
*
j
ij
n
Hni
i i
*
i
i
n
i
δni
∑ ci ∫ φn * Hˆ φi = E ∑ ci ∫ φ n *φi
∑ H ni ci = Ecn
H c = Ec
{Eigenvalue Problem}
10.34, Numerical Methods Applied to Chemical Engineering
Prof. William Green
Lecture 8
Page 3 of 4
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical
Engineering, Fall 2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of
Technology. Downloaded on [DD Month YYYY].
Find the eigenvalues E. These are needed for calculations of G (free energy),
thermodynamic constants, rate constants, and spectroscopic values.
10.34, Numerical Methods Applied to Chemical Engineering
Prof. William Green
Lecture 8
Page 4 of 4
Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical
Engineering, Fall 2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of
Technology. Downloaded on [DD Month YYYY].
Download