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.
 A: 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.
A: 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)}
$.
