# Generalised Eigenvalue Problem Formulation of Orr-Sommerfeld Eigenvalue Problem

I'm a newbie to numerical solutions of differential equations and eigenvalue problems as well as numerical linear algebra in general. We barely covered how to formulate problems properly (probably like 1 lecture in the past 3 years) and so I'm a bit stuck with how to properly get the OS Eigenvalue problem into the generalised Eigenvalue problem form. Now, the approach i'm taking is to start with $$\phi^{iv} - 2\alpha^2 \phi'' + \alpha^4 \phi = i\alpha R[(U-c)(\phi'' -\alpha^2\phi)-U''\phi]$$ Then to write $D \equiv (\frac{d^2}{dz^2} - \alpha^2)$, and then $q = D\phi$. This leaves me with two coupled second order ODES: $$\phi'' -\alpha^2\phi = q$$ and $$q'' -\alpha^2q = i\alpha R[(U-c)q - U''\phi]$$ $U(z) = z(z-1)$ and we have boundary conditions $\phi'(0)=\phi(0)=\phi(1)=\phi'(1)=0$.  My Question is: How do I get this in the form of a generalised eigenvalue problem $A\underline{x} = cB\underline{x}$? I know that $$\underline{x} = \begin{pmatrix} \phi_0 \\ q_0 \\ \vdots \\ \phi_{N-1} \\ q_{N-1} \end{pmatrix}$$However, I'm not sure how to find $B$ because not everything on the right hand side is multiplied by $c$ once i've arranged it so that I have something like the simple eigenvalue problem $F'' = -\lambda^2 F$ which I did before this one using the centered difference method. Any hints/tips would be very welcome, I'm not looking necessarily for an answer to be given for me, but just an idea of how to approach this since at the moment i'm completely stuck.