Maths Assignment Help
Maths Assignment Help
(ii) What does this tell you about the eigenvalues λ of B− 1A , i.e.
the solutions of B−1Ax = λx?
Problem 3:
For this question, you may find it helpful to refer to the notes
and reading from lecture 3. Consider a finite-difference
approximation of the form:
(a) Substituting the Taylor series for u(x+ Δx) etcetera (assuming
u is a smooth function with a convergent Taylor series, blah
blah), show that by an appropriate choice of the constants c and
d you can make this approximation fourth-order accurate: that is,
the errors are proportional to (Δx)4 for small Δx.
(b) Check your answer to the previous part by numerically
computing u ′ (1) for u(x) = sin(x), as a function of Δx, exactly as
in the handout from class (refer to the notebook posted in lecture
3 for the relevant Julia commands, and adapt them as needed).
Verify from your log-log plot of the |errors| versus Δx that you
obtained the expected fourth-order accuracy.
Solutions
Problem 1:
(ii) From 18.06, similarity means that B−1A has the same
eigenvalues as C, and since C is Hermitian these eigenvalues
are real.
(iii) No, they are not (in general) orthogonal. The eigenvectors Q
of C are (or can be chosen) to be orthonormal (Q∗Q = I), but
the eigenvectors of B−1A are X = M−1Q = B−1/2Q, and hence
X∗X = Q∗B−1Q = I unless B = I.
(iv) Note that there was a typo in the pset. The eigvals function
returns only the eigenvalues; you should use the eig function
instead to get both eigenvalues and eigenvectors, as explained
in the Julia handout.
The array lambda that you obtain in Julia should be purely real, as
expected. (You might notice that the eigenvalues are in somewhat
random order, e.g. I got -8.11,3.73,1.65,1.502,0.443. This is a side
effect of how eigenvalues of non-symmetric matrices are
computed in standard linear-algebra libraries like LAPACK.) You
can check orthogonality by computing X∗X via X’*X, and the
result is not a diagonal matrix (or even close to one), hence the
vectors are not orthogonal.
Using the fact that the xn are necessarily orthogonal (they are
eigenvectors of a Hermitian matrix for distinct eigenvalues), we
can take the dot product of both sides with xm to find that c¨n −
2˙cn − λnc = 0 for each n, and hence
Problem 2:
(ii) No, any solution will not be unique, because we now have a
nonzero nullspace spanned by the constant function u(x) = 1
(which is periodic):
The same reasoning works if you write out the Fourier series in
terms of sin and cos sums separately, in which case you find that
f must be missing the n = 0 cosine term, giving the same result.
Problem 3: