Determinant tridiagonal matrix Can anybody help me out with getting an expression of the values of $\lambda$ for a matrix $A$ for which $det(A-\lambda I)$ equals the determinant of a matrix with on the main diagonal $-\lambda$, on the diagonal above the main diagonal $\dfrac{1}{2}$ and on the diagonal under the main diagonal $\frac{1}{2} \lambda$.
 A: The determinant of such tridiagonal matrices of order $n$ are computed with the linear recurrence of order $2$:
$$D_n=-\lambda D_{n-1}-\frac\lambda4 D_{n-2}$$
and the initial conditions $\; D_0=1,\enspace D_1=\lambda$.
How to find a closed formula for $D_n$ :
We look for basic solutions that are geometric progressions $r^n\ (r\ne 0)$; this leads to
$$r^n=-\lambda r^{n-1}-\frac\lambda4 r^{n-2}\iff r^2=-\lambda r-\frac\lambda4. $$
So the possible values of $r$ are the roots $r_1,r_2$ of the characteristic equation:
$$r^2+\lambda r+\frac\lambda4=0.$$
The general solution is a linear combination of the basic solutions: $\;\alpha r_1^n+\beta r_2^n$, where $\alpha, \beta$  are determined by the initial conditions.
A: The determinant of the tridiagonal matrix can be expressed by the recurrence (link):
$$
f_n = -\lambda f_{n-1} -\frac{1}{4}\lambda f_{n-2} \quad (*)
$$
and the initial values $f_0=1$, $f_{-1}= 0$.
For $\lambda = 0$ the determinant vanishes. Otherwise:
So $f_1 = -\lambda$, $f_2 = \lambda^2 - \frac{1}{4} \lambda$,
$f_3 = -\lambda^3 + \frac{1}{4} \lambda^2+\frac{1}{4}\lambda^2=-\lambda^3+\frac{1}{2}\lambda^2$ and so on.
Solving the recurrence relation:
This is a homogenous linear recurrence relation with characteristic polynomial
$$
p(t) = t^2 + \lambda t + \lambda/4 \\
$$
with roots
$$
0 = (t + \lambda/2)^2 + (\lambda -\lambda^2)/4 \iff \\
t_{1,2} = \frac{\pm \sqrt{\lambda(\lambda-1)}-\lambda}{2}
$$
Case two roots:
For $\lambda \ne 1$ this leads to solutions
$$
f_n = \frac{1}{2^n} \left(
c_1 \left(\sqrt{\lambda(\lambda-1)}-\lambda\right)^n +
c_2 \left(-\sqrt{\lambda(\lambda-1)}-\lambda\right)^n
\right)
$$
Inserting $f_0$ and $f_1$ gives
$$
1=c_1+c_2 \\
-\lambda = c_1 t_1 + c_2 t_2 = c_1(t_1-t_2)+ t_2
$$
thus
$$
c_1 
= \frac{t_2+\lambda}{t_2-t_1}
\quad\quad
c_2 
= \frac{t_1+\lambda}{t_1-t_2}
$$
We have
\begin{align}
t_2 + \lambda
&=
\frac{-\sqrt{\lambda(\lambda-1)}-\lambda}{2} + \lambda
=
\frac{-\sqrt{\lambda(\lambda-1)}+\lambda}{2} \\
t_2 - t_1 
&= 
\frac{-\sqrt{\lambda(\lambda-1)}-\lambda}{2} -
\frac{\sqrt{\lambda(\lambda-1)}-\lambda}{2}
= -\sqrt{\lambda(\lambda-1)}
\end{align} 
so
\begin{align}
c_1 &=
-\frac{-\sqrt{\lambda(\lambda-1)}+\lambda}{2\sqrt{\lambda(\lambda-1)}}
=
\frac{1}{2} - \frac{1}{2}\sqrt{\frac{\lambda}{\lambda-1}} \\
c_2
&=
\frac{1}{2} + \frac{1}{2}\sqrt{\frac{\lambda}{\lambda-1}}
\end{align}
Case one root:
For $\lambda = 1$ we have only one root
$$
t = -\frac{1}{2}
$$
and try
$$
f_n = \left(-\frac{1}{2}\right)^n (c_3 + c_4 n)
$$
Inserting $f_0 = 1$ gives $c_3 = 1$ and $f_1= -\lambda = -1$ gives $c_4 = 1$.  
Result:
This results in the determinant value
$$
f_n = 
\begin{cases}
0 & ; \lambda = 0 \\
\left(-\frac{1}{2}\right)^n \left[ 1 + n \right] & ; \lambda = 1 \\
\frac{1}{2^{n+1}} \left[
\left(1 - \sqrt{\frac{\lambda}{\lambda-1}}\right)
\left(\sqrt{\lambda(\lambda-1)}-\lambda\right)^n + \\
\left(1 + \sqrt{\frac{\lambda}{\lambda-1}}\right)
\left(-\sqrt{\lambda(\lambda-1)}-\lambda\right)^n
\right]
& ; \text{else} \\
\end{cases}
$$
Test:
The $f_n$ were calculated via the recursive equation $(*)$, $g(n)$ and $h(n)$ are cases of the result forumula above. Both evaluations should match.
Two roots, $n = 3$:
(%i) [f3,expand(radcan(g(3)))];
                             2        2
                            L     3  L     3
(%o)                       [-- - L , -- - L ]
                            2        2

One root, $n = 3$:
(%i) [ev(f3,L=1),expand(radcan(h(3)))];
                                  1    1
(%o)                           [- -, - -]
                                  2    2

Two roots, $n=8$:
(%i) [f8,expand(radcan(g(8)))];
              7       6      5    4           7       6      5    4
       8   7 L    15 L    5 L    L     8   7 L    15 L    5 L    L
(%o) [L  - ---- + ----- - ---- + ---, L  - ---- + ----- - ---- + ---]
            4      16      32    256        4      16      32    256

One root, $n = 8$:
(%i) [ev(f8,L=1),expand(radcan(h(8)))];
                                 9    9
(%o)                           [---, ---]
                                256  256

