Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/January 2004

Solution 1a
Consider interval $$[x_i,x_{i+1}]\!\,$$. Since $$q'_i(x)\!\,$$ is linear on this interval, using the point slope form we have


 * $$q_i'(x)=\frac{z_{i+1}-z_i}{x_{i+1}-x_i}(x-x_i)+z_i\!\,$$

Integrating, we have


 * $$q_i(x)=z_ix+\frac{z_{i+1}-z_i}{x_{i+1}-x_i}\frac{(x-x_i)^2}{2}+K_i\!\,$$

or, in a more convenient form,


 * $$q_i(x)=z_i(x-x_i)+\frac{z_{i+1}-z_i}{x_{i+1}-x_i}\frac{(x-x_i)^2}{2}+y_i\!\,$$

Solution 1
Since $$q\!\,$$ is continuous on $$[a,b]\!\,$$,


 * $$q_{i-1}(x_i)=q_i(x_i)=y_i\!\,$$

i.e.


 * $$z_{i-1}(x_i-x_{i-1})+\frac{z_i-z_{i-1}}{x_i-x_{i-1}}\frac{(x_i-x_{i-1})^2}{2}+y_{i-1}=y_i\!\,$$

Simplifying and rearranging terms yields the reoccurrence formula


 * $$z_i=-z_{i-1}+\frac{2(y_i-y_{i-1})}{x_i-x_{i-1}} \quad i=1,\ldots n\!\,$$

Unshifted Version

 * $$Q_kR_k=A_k \!\,$$
 * $$A_{k+1}=R_kQ_k \!\,$$

Shifted Version

 * $$Q_kR_k=A_k-\chi_kI \!\,$$
 * $$A_{k+1}=R_kQ_k+\chi_kI \!\,$$

Solution 2b
Suppose $$A_m=U^TAU$$ for some unitary $$U$$. Since $$R_m=Q_m^TA_m$$ we have

$$A_{m+1}=R_mQ_m=Q_m^TA_mQ_m=Q_m^TU^TAUQ_m$$

which is as desired as $$Q_mU$$ is unitary.

For the shifted case, the same argument holds using the fact that $$R_m=Q_m^T(A_m-\chi_m I)$$.

Solution 2c
The shifted iteration appears to work better because its diagonal entries are closer to the actual eigenvalues than the diagonal entries of the unshifted iteration.

Unshifted Iteration
$$A_1=\begin{pmatrix} 3.5 & .5 \\ .5 & 1.5 \end{pmatrix} \!\,$$

Shifted Iteration
$$A_1=\begin{pmatrix} 3.6 & .2 \\ .2 & 1.4 \end{pmatrix} \!\,$$

Useful Relationship
Since $$A \!\,$$ is symmetric


 * $$(Ax,y)=(x,A^Ty)=(x,Ay) \!\,$$

This relationship will used throughout the solutions.

Substitute into Functional
$$ \begin{align} F(x_v+\alpha d_v) &= \frac12\langle x_v+\alpha d_v, Ax_v+\alpha A d_v \rangle - \langle b, x_v + \alpha d_v \rangle \\ &= \frac{\langle d_v,Ad_v \rangle}{2}\alpha^2+\alpha \langle d_v,Ax_v \rangle - \alpha \langle b, d_v \rangle + \frac12 \langle x_v, A x_v \rangle - \langle b, x_v \rangle \end{align} \!\,$$

Take Derivative With Respect to Alpha
$$F'(x_v+\alpha d_v)=\langle d_v, Ad_v \rangle \alpha + \langle d_v, Ax_v \rangle - \langle b, d_v \rangle \!\,$$

Set Derivative Equal To Zero
$$0=\langle d_v, Ad_v \rangle \alpha + \langle d_v, Ax_v -b \rangle \!\,$$

which implies

$$\alpha = \frac{\langle d_v, r_v \rangle}{\langle d_v, A d_v \rangle} \!\,$$

Solution 3b
$$ \begin{align} \langle x, Ad_k \rangle &= \langle \sum_{j=1}^n \hat{x}_j d_j, A d_k \rangle \\ &= \sum_{j=1}^N \hat{x}_j \langle d_j, A d_k \rangle\\ &= \hat{x}_k \langle d_k, Ad_k \rangle \end{align} \!\,$$

which implies

$$\hat{x}_k = \frac{\langle x, Ad_k \rangle}{ \langle d_k, A d_k \rangle} \!\,$$

Solution 3c
$$ \begin{align} \langle r_v, d_v \rangle &= \langle b-Ax_v, d_v \rangle \\ &= \langle Ax-Ax_v, dv \rangle \\ &= \langle Ax, d_v \rangle - \langle Ax_v, d_v \rangle \\ &= \langle x,A d_v \rangle - \underbrace{\langle x_v, A d_v \rangle}_0 \\ &=\hat{x}_v \langle d_v, Ad_v \rangle \end{align} \!\,$$

which implies

$$\hat{x}_v=\frac{\langle r_v, d_v \rangle}{\langle d_v, Ad_v \rangle} \!\,$$