# Statement of the problem

I need to (numerically) solve an eigenproblem of the type

$$-\omega^2\mathcal{D}_1\vec{x}=\mathcal{D}_2\vec{x}$$ on the interval $[-1,1]$, where $\mathcal{D}_1$ and $\mathcal{D}_2$ are differential operators with a generalised boundary condition of the form

$$\omega^2\mathcal{D}_3\vec{x}(±1)+a~\omega\mathcal{D}_4\vec{x}(±1)+b~\mathcal{D}_5\vec{x}(±1)=0~.$$

where $\mathcal{D}_3$, $\mathcal{D}_4$ and $\mathcal{D}_5$ are more differential operators.

The critical feature here being the fact that the eigenvalue appears in the boundary condition.

# My personal take on it

SLEPc offers a wide range of method for dealing with generalised eigenvalue problems including the so-called polynomial eigenvalue problem. I used a spectral representation to cast my differential problem into a regular quadratic matrix eigenvalue problem of the form

$$(A\omega^2+B\omega+C)\vec{x}=0$$

I have used row replacement to include the boundary condition into my matrices. Since the first power of $\omega$ only appears in the boundary condition, the $B$ matrix is mostly empty.

For clarity, here is an idea of what the matrices look like

I expect that, if everything is done correctly, feeding this system into a dedicated solver for quadratic eigenvalue problems should spit out the expected eigenvalues (in some easy case, my particular system has analytical solutions). However, I haven't been able to recover these.

# My question

I have already spent a decent amount of time trying to find bugs in my code and will continue to do so. But in the meantime, I figured I might ask if anyone had a similar problem and had a different approach. I am especially anxious to know if perhaps there are some results unknown to me that might render my whole approach too naive and hopeless.

Any help would be greatly appreciated.

• I don't see any glaring problems with your formulation. However, as someone who has dealt with the spectral discretization of eigenvalue problems a great deal, I have to ask what steps you've taken to verify that the key ingredients to this approach are working correctly because they are far from trivial. Are you sure all your differential matrix operators are indeed returning the appropriate derivative? Are you sure your row-replacement boundary conditions are enforcing the B.C. as you expect it to? The SLEPc polynomial EV solver should be verified in its own right, also. – Spencer Bryngelson Aug 10 '16 at 17:18
• Thanks for the interest, Spencer. Indeed, checking every building block one after the other is a painfully long process. I have been able to test most of mine on a wide range of simpler problems and I am fairly sure of each of them. Of course, if there is nothing wrong with the method, then it means that the assembling of the whole thing might be in trouble which is what I have been checking for a while and still checking. Yet, I would be glad to read about any possible theoretical objections concerning the method I use. – jrekier Aug 10 '16 at 17:40
• Thanks again Spencer, I think reading your suggestion, though it contained things that I had already tried actually set me on the right track to solve my problem. Upon testing the enforcing of my boundary condition again, I have found the last bug that prevented me of getting my answer :) I can now ensure that the method is liable and runs smoothly ! Cheers mate – jrekier Aug 11 '16 at 17:10
• Glad to hear! My pleasure. – Spencer Bryngelson Aug 11 '16 at 17:15