<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] https://en.wikipedia.org/wiki/Tridiagonal_matrix
$f_n = \left|
\begin{array}{llll}
a_1 & b_1 &0 &0 &0 \\
c_1 & a_2 & b_2 &0 & 0\\
0 & c_2 & \ddots & \ddots & 0\\
 0 &0 & \ddots & \ddots & b_{n-1}\\
0  &0 &0 & c_{n-1} & a_n
  \end{array}
\right|
$
with $f_0 = 1, f_{-1} = 0$.
$f_n
= a_n f_{n-1}-c_{n-1}b_{n-1}f_{n-2}
$.
If all
$a_i = a, b_i = b, c_i = c$
then
$f_n
= a f_{n-1}-cbf_{n-2}
$.
In this case,
$b = c = 1,
a = 2\cos(t)
$
so
$f_n
=  2\cos(t)f_{n-1}-f_{n-2}
$
so
$f_n = \left|
\begin{array}{ccccc}
2\cos(t) & 1 &0& 0&0\\
1 & 2\cos(t) & 1 & 0& 0\\
0 & 1 & \ddots & \ddots &0 \\
 0 &0 & \ddots & \ddots & 1\\
  0&0 &0 & 1 & 2\cos(t)
  \end{array}
\right|
$
Therefore
$f_n\sin(t)
=  2f_{n-1}\sin(t)\cos(t)-\sin(t)f_{n-2}
$.
Let
$g_n
=f_n\sin(t)
$,
so
$g_n
=  2\cos(t)g_{n-1}-g_{n-2}
$.
Since
$f_0 = 1$
and
$f_1 = 2\cos(t)
$,
$g_0 = \sin(t)$
and
$g_1
=2\sin(t)\cos(t)
=\sin(2t)
$.
We have
$\begin{array}\\
\sin((n+1)t)+\sin((n-1)t)
&=\sin(nt)\cos(t)+\cos(nt)\sin(t)+\sin(nt)\cos(t)-\cos(nt)\sin(t)\\
&=2\sin(nt)\cos(t)\\
\end{array}
$
or
$\sin((n+1)t)=2\sin(nt)\cos(t)-\sin((n-1)t)
$.
Therefore
$g_n(t)
=\sin((n+1)t)$,
so
$f_n(t)
=\dfrac{\sin((n+1)t)}{\sin(t)}
$.
</s>