Solution (source code)

= Solution

The <simultaneous diagonalization> from part (a) applies to both $B$ and $C$. With $\theta_k=k\pi h$,
$$
Q^{-1}BQ=D=\operatorname{diag}(d_1,\ldots,d_m),
\qquad
d_k=-\frac{10}3+\frac43\cos\theta_k,
$$
and
$$
Q^{-1}CQ=E=\operatorname{diag}(e_1,\ldots,e_m),
\qquad
e_k=\frac23+\frac13\cos\theta_k.
$$
Multiplying the $j$th block equation by $Q^{-1}$ and writing $v_j=Q^{-1}u_j$ and $c_j=Q^{-1}b_j$ gives
$$
Ev_{j-1}+Dv_j+Ev_{j+1}=c_j,
$$
with the absent boundary terms omitted. This is exactly system (3).