Eigen value and eigen functions of linear operator

I am doing the linear stability analysis of a system of equations representing a free surface flow, which typically ends up with a generalised eigenvalue problem of the form:

  • L_{1} X = \lambda p(z) u
  • L_{2} X = \lambda p(z) w

where L_{i} are linear differential operators, X = [u, w, \Gamma, \Omega] is a vector of variables and p is a known function, and \lambda the eigenvalue. Two algebraic equations complement this system:

  • \Gamma = \mathcal{F}(u', w')
  • \Omega = \mathcal{G}(u', w')

and 5 boundary conditions:

  • u(0) = w(0) = 0
  • \Gamma(1) = -C_{1}h
  • \Omega(1) = -C_{2}h
  • w(1) = h(\lambda + C_{3})

where C_{i} are constants. Note that those BCs introduce a new variable h (which can be eliminated), and that the last one involves the eigenvalue.

I am new to these kinds of problems, but I understand that I have basically two dominant ways of approaching this:

  1. the spectral method, i.e Galerkin or Tau method
  2. the pseudospectral method, e.g. Chebyshev collocation method

I have several questions before committing to a way of solving this:

  • What Julia packages would provide a high-level interface for doing this? From what I have found:

    • ApproxFun.jl works in the spectral case and would provide support for the spectral method.
    • From this post, it seems that ClassicalOrthogalPolynomial.jl is the package to use for the collocation method, to obtain the discretisation of the operator on the collocation points?

    Are those the right packages for this, or are there other better-suited?

  • I am familiar with how to impose boundary conditions on the collocation method. However, I am not familiar with the spectral method and working in the coefficient space. ApproxFun.jl has examples about solving simpler eigenvalue problems with simpler boundary conditions using basis recombination. How should I handle my more complex boundary conditions using ApproxFun? I can see how I could build my matrix by stacking operators and the algebraic relations, but that’s as far as I know for now.

As a concluding remark, I am open to any suggestions for solving this problem.

Thanks!