<s>[INST] Show that $x_k = (\sin( k\pi h), \sin(2 k\pi h), \sin(3 k\pi h), ... )$ is an eigenvector of a tridiagonal A. I'm looking at problem 3 from Gilbert Strang's Linear Algebra and Its Applications, 4e, section 7.4:

Multiplying $Ax_k$ as written gives me:
$$ Ax_k = \begin{bmatrix}2\sin(k\pi h) &- \sin(2 k\pi h) \\ - \sin( k\pi h) &+ 2\sin(2k\pi h) &- \sin(3 k\pi h) \\ & - \sin(2 k\pi h) & + 2\sin(3k\pi h) & - \sin(4 k\pi h) \\ &&...\end{bmatrix} $$
(Note that this is a column vector, but I spaced it out to indicate the pattern.)
I'm struggling to see this as a multiple of $(\sin( k\pi h), \sin(2 k\pi h), \sin(3 k\pi h), ... ) $. I thought that maybe I am supposed to assume that $k$ and $h$ are integers so that I can use the periodicity of sine to simplify $Ax_k$. But that just makes $x_k$ = 0. 
So I looked at the solution, which says that the corresponding eigenvalue is $2 - 2\cos(k\pi h)$, and tried to work backwards. But computing $2 - 2\cos(k\pi h) x_k$ also doesn't seem to get me anywhere close to $Ax_k$. Even the first entry is clearly different:
$$\begin{align}[2 - 2\cos(k\pi h) x_k]_1 & = 2\sin(k\pi h) - 2\cos(k\pi h)\sin(2k \pi h)\\ &\ne 2\sin(k\pi h) - \sin(2 k\pi h) \end{align}$$
(unless $k$ and $h$ are both integers, as above) 
I would appreciate a hint. 
 [/INST] We can write 
$$Ax_k = 2 \begin{bmatrix} \sin(k\pi h) \\ \sin(2k\pi h) \\ \vdots \\ \sin(nk \pi h) \end{bmatrix}  -\begin{bmatrix} \sin(2k \pi h) \\ \sin(k\pi h) + \sin(3k \pi h) \\ \vdots \\ \sin((n-1) k \pi h) \end{bmatrix}$$
A helpful identity is that 
$$\sin(x) + \sin(y) = 2 \sin \left(\frac{x+y}{2}\right) \cos\left(\frac{x-y}{2}\right)$$
From this we get that 
$$\sin((\ell-1) k\pi h) + \sin((\ell+1)k\pi h) = 2 \sin(\ell k \pi h)\cos( k\pi h)$$
Using this, we have 
$$Ax_k = 2 \begin{bmatrix} \sin(k\pi h) \\ \sin(2k\pi h) \\ \vdots \\ \sin(nk \pi h) \end{bmatrix}  - \begin{bmatrix} \sin(2k \pi h) \\ 2\sin(2k\pi h)\cos(k\pi h) \\ \vdots \\ 2\sin((\ell+1) k\pi h) \cos(k\pi h) \\ \vdots \\ \sin((n-1)k \pi h) \end{bmatrix}$$ 
Note that 
$$\sin(2k\pi h) = 2 \sin(k\pi h) \cos(k \pi h)$$
also, $\sin((n+1) k \pi h) = 0$ so 
$$\sin((n-1) k \pi h)  = \sin((n-1) k \pi h) + \sin((n+1) k \pi h) = 2\sin(n k \pi h) \cos(k \pi h)$$
so 
$$Ax_k = 2 \begin{bmatrix} \sin(k\pi h) \\ \sin(2k\pi h) \\ \vdots \\ \sin(nk \pi h) \end{bmatrix}  - \begin{bmatrix} 2\sin(k\pi h)\cos(k \pi h) \\ 2\sin(2k\pi h)\cos(k \pi h) \\ \vdots \\ 2\sin(nk \pi h)\cos(k \pi h) \end{bmatrix} = (2 - 2\cos(k \pi h))\begin{bmatrix} \sin(k\pi h) \\ \sin(2k\pi h) \\ \vdots \\ \sin(nk \pi h) \end{bmatrix}$$
Hope this helps. 
</s>