<s>[INST] How to prove this formula for the determinant of a $4 \times 4$ tridiagonal matrix? This following is a problem from B. S. Grewal's Higher Engineering Mathematics. 

Show
$$\begin{vmatrix} 2\cos(\theta) & 1 & 0 & 0 \\ 1 & 2 \cos(\theta) & 1
 & 0 \\ 0 & 1 & 2 \cos(\theta) & 1 \\ 0 & 0 & 1 & 2 \cos(\theta)
 \end{vmatrix} = \frac{\sin(5\theta)}{\sin(\theta)}.$$

If I take the $3 \times 3$ matrix after deleting the first row and first column, the value is $\frac{\sin(4\theta)}{\sin(\theta)}$, but I am unable to solve this $4\times 4$ matrix. I tried solving the RHS but I am still unable to solve.
 [/INST] By an expansion on the first column one gets 
\begin{align}\begin{vmatrix} 2\cos(\theta) & 1 & 0 & 0 \\ 1 & 2 \cos(\theta) & 1 & 0 \\ 0 & 1 & 2 \cos(\theta) & 1 \\ 0 & 0 & 1 & 2 \cos(\theta) \end{vmatrix} &= 2 \cos(\theta) \begin{vmatrix} 2 \cos(\theta) & 1 & 0 \\ 1 & 2 \cos(\theta) & 1 \\ 0 & 1 & 2 \cos(\theta) \end{vmatrix}\\
&- \begin{vmatrix} 1  & 0 & 0 \\ 1 & 2 \cos(\theta) & 1 \\ 0 & 1 & 2 \cos(\theta) \end{vmatrix} \\
&=2\cos(\theta) \bigg ( 2 \cos(\theta) \begin{vmatrix} 2\cos(\theta) & 1 \\ 1 & 2 \cos(\theta) \end{vmatrix} - \begin{vmatrix} 1 & 0 \\ 1 & 2 \cos(\theta) \end{vmatrix} \bigg)\\
&= 4 \cos^2(\theta) (4\cos^2(\theta) - 1) - 4 \cos^2(\theta) - (4 \cos^2\theta) - 1) \\
&= 16 \cos^4(\theta) - 12 \cos^2(\theta) + 1.\end{align}
Now we use the trigonometric Pythagoras $\sin^2(\theta) + \cos^2(\theta) = 1$. With this formula, the above expression can be rewritten as
\begin{align} 16 (1 - \sin^2(\theta))^2 - 12 (1 - \sin^2(\theta)) + 1 &= 16 - 32 \sin^2(\theta) + \sin^4(\theta)-12 + 12 \sin^2(\theta) + 1 \\
&= \sin^4(\theta) - 20 \sin^2(\theta) + 5.\end{align}
The last formula is valid for every value of $\theta$. The result which you have to show is true if and only if $\theta \neq k\pi$, where $k \in \mathbb{Z}$. For those $\theta$, the last term is equivalent to
$$\frac{\sin^5(\theta) - 20 \sin^3(\theta) + 5\sin(\theta)}{\sin(\theta)}.$$
Now it is a basic trigonometric addition formula that $\sin^5(\theta) - 20 \sin^3(\theta) + 5\sin(\theta) = \sin(5\theta)$. This shows that the last term is equal to 
$$\frac{\sin(5\theta)}{\sin(\theta)},$$
which was to be proven.
</s>