The equation $$a_2(x)y''(x)+a_1(x)y'(x)+a_0(x)y(x)+\lambda y=0, \quad a<x<b,$$ can be brought into the so-called self-adjoint form given by $${1\over w(x)}[(p(x)y')'+q(x)y]+\lambda y=0,$$ via
$$
w(x)=\exp\left(\int {a_1(x)-a_2'(x)\over a_2(x)}\,dx\right), \quad p(x)=a_2(x)w(x), \quad q(x)=a_0(x)w(x).
$$
(It's a good exercise to show why this is true.)
The $w(x)$ here is the weight function.
Let $L$ be the operator $Lf=-f''$ defined on the domain $\mathcal{D}(L)$ consisting of twice absolutely continuous functions $f$ on $[-\pi,\pi]$ that satisfy periodic conditions $f(-\pi)=f(\pi)$ and $f'(-\pi)=f'(\pi)$. Then $L$ is symmetric on its domain because, for $f,g\in \mathcal{D}(L)$, one has
$$
(Lf,g)-(f,Lg) = \int_{-\pi}^{\pi}f(t)\overline{g''(t)}-f''(t)\overline{g(t)}dt \\
= \int_{-\pi}^{\pi}\frac{d}{dt}\{f(t)\overline{g'(t)}-f'(t)\overline{g(t)}\}dt \\
= \left.\{f(t)\overline{g'(t)}-f'(t)\overline{g(t)}\}\right|_{t=-\pi}^{\pi}=0.
$$
Therefore, if $Lf=\lambda f$ and $f\ne 0$, it follows that $\lambda$ is real because
$$
(\lambda-\overline{\lambda})(f,f)=(Lf,f)-(f,Lf) = 0.
$$
Likewise if $f,g$ are not identically $0$ and $Lf=\lambda f$, $Lg=\mu g$ with $\lambda\ne \mu$, then $(f,g)=0$ because
$$
(\lambda-\mu)(f,g) = (Lf,g)-(f,Lg) = 0.
$$
Note that $L1 = \lambda 1$ where $\lambda=0$. This makes sense because the constant function $1$ is in the domain of $L$, as it is twice absolutely continuous, and it is periodic in the the function and its first derivative. And,
$$
L\sin(nx) = n^2 \sin(nx),\;\; L\cos(nx)=n^2\cos(nx).
$$
So, $\lambda_n = n^2$ are eigenvalues for $n=0,1,2,\cdots$. The eigenspace $\{ 1\}$ for $\lambda=0$ is one-dimensional. The eigenspace $\{\sin(nx),\cos(nx)\}$ is two-dimensional with eigenvalue $\lambda_n=n^2$. There is latitude on how you choose the elements of $E_n$ for $n \ne 0$, but it is convenient to choose an orthogonal basis, which is what choosing $\sin(nx),\cos(nx)$ does. You could instead choose $\{ e^{inx},e^{-inx}\}$, which is also an orthogonal basis. Or you could choose $\{ e^{inx},\cos(nx) \}$, which is not an orthogonal basis for the two-dimensional eigenspace, even though it is a basis.
The standard Fourier basis is $\{ 1,\cos(x),\sin(x),\cos(2x),\sin(2x),\cdots\}$ which consists of orthogonal real functions. To expand $f \in L^2[-\pi,\pi]$ in such a basis,
$$
f \sim a_0 1 + a_1 \cos(x)+ b_1 \sin(x) + a_2 \cos(2x)+ b_2\sin(2x) + \cdots,
$$
one formally takes the dot product of $f$ with one of the basis elements as well as the series on the right. Using orthogonality,
$$
(f,1) = a_0(1,1), \;\;\; a_0 = \frac{(f,1)}{(1,1)} \\
(f,\cos(nx)) = a_n (\cos(nx),\cos(nx)),\;\;\; a_n = \frac{(f,\cos(nx))}{(\cos(nx),\cos(nx))} \\
(f,\sin(nx)) = b_n (\sin(nx),\sin(nx)),\;\;\; b_n = \frac{(f,\sin(nx))}{(\sin(nx),\sin(nx))}.
$$
Using $(1,1)=2\pi$ and $(\cos(nx),\cos(nx))=\pi$, $(\sin(nx),\sin(nx))=\pi$ gives the Fourier series expansion:
$$
f \sim \frac{1}{2\pi}(f,1) + \frac{1}{\pi}\sum_{n=1}^{\infty}\{(f,\cos(nx))\cos(nx)+(f,\sin(nx))\sin(nx)\} \\
\sim \frac{1}{2\pi}\int_{-\pi}^{\pi}f(t)dt
+ \sum_{n=1}^{\infty}\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\sin(nt)dt\sin(nx)+\frac{1}{\pi}\int_{-\pi}^{\pi}f(t)\cos(nt)dt\cos(nx).
$$
Note: The integral orthogonality did not come from such arguments. The "orthogonality" property of the trigonometric functions was an experimentally discovered fact when trying to write an initial condition for a vibrating string problem in terms of travelling waves. This predated Fourier's work, finite-dimensional linear algebra, eigenfunction analaysis, etc., by decades.
Best Answer
Rewrite the equation of the eigenvalues as $$ \tan(L\,\lambda)=\frac{\alpha_2-\alpha_1}{\lambda^2+\alpha_1 \alpha_2}\lambda. $$ Obviously $\lambda=0$ is an eigenvalue, and if $\alpha_1=\alpha_2$, then the eigenvalues are $\lambda=k\,\pi/L$, $k\in\mathbb{Z}$, $k\ge0$.
Assume from now on $\alpha_1\ne\alpha_2$. Looking at the graphs of $\tan(L\,\lambda)$ and $\dfrac{\alpha_2 - \alpha_1}{\lambda^2 + \alpha_1 \alpha_2}\lambda$ as functions of $\lambda$, you see that there is eigenvalue in each interval $$ \Bigl(\frac{(2\,k-1)\pi}{2\,L},\frac{(2\,k+1)\pi}{2\,L}\Bigr),\quad k\ge1, $$ and depending on the values of the parameters, maybe another one on the interval $(0,\pi/(2\,L))$. You can use Newton's method to find a numerical approximation, taking for instance as a first approximation the middle point of each interval, $k\,\pi/L$.