function pass = orrsommerfeld

% Eigenvalues of the Orr-Sommerfeld operator

tol = chebfunpref('eps');

d = domain(-1,1);
R = 5772;
D = diff(d);  I = eye(d);
x = chebfun('x',d);

A = (D^4-2*D^2+I)/R - 2i*I - 1i*diag(1-x.^2)*(D^2-I);
B = D^2-I;

A.lbc(1) = I;  A.lbc(2) = D;
A.rbc(1) = I;  A.rbc(2) = D;

lam = eigs(A,B,10,'LR');

correct = [
     -7.819078104994955e-005-2.615676705860811e-001i
    -4.620366193293003e-002-9.534328425761246e-001i
    -4.624279708795331e-002-9.534587499934722e-001i
    -5.767171976874375e-002-3.229637183677176e-001i
    -8.298700703740958e-002-9.161327256325181e-001i
    -8.308878603034946e-002-9.162146222226847e-001i
    -1.197442736203496e-001-8.787833344958154e-001i
    -1.199267702337461e-001-8.789590506048377e-001i
    -1.548324840901456e-001-4.044151548530878e-001i
    -1.564823130376978e-001-8.413737949305676e-001i
];

pass = norm( lam-correct, Inf) < 1e-7*(tol/eps);

