# Basis functions and weak ODE solution

Given some linear differential operator $$L$$, I'm trying to solve the eigenvalue problem $$L(u) = \lambda u$$. Given basis functions, call them $$\phi_i$$, I use a variational procedure and the Ritz method to approximate $$\lambda$$ via the associated weak formulation $$\langle L(\phi_i),\phi_j\rangle = \lambda \langle \phi_i,\phi_j\rangle.$$

As you can see, this expression is now a matrix equation, solutions to which are straightforward. For my particular problem, the basis functions are $$\phi_j = \cos\left( \frac{\pi j}{2}(x+1) \right) \cosh\left( \frac{\pi j}{2}(y+h) \right).$$

However, this solution, when inputted into the weak formulation equation, does not output correct eigenvalues. However, $$\phi_j$$ can be split into even and odd components: $$\phi_j^o = \sin \left( \pi(j-1/2)x \right)\cosh\left( \pi(p-1/2)(y+h) \right)\\ \phi_j^e = \cos \left( \pi j x \right)\cosh\left( \pi j(y+h) \right)$$

Now to obtain eigenvalues I solve two separate equations, one for even eigenvalues and one for odd: $$\langle L(\phi_i^e),\phi_j^e\rangle = \lambda \langle \phi_i^e,\phi_j^e\rangle\\ \langle L(\phi_i^o),\phi_j^o\rangle = \lambda \langle \phi_i^o,\phi_j^o\rangle.$$

This latter approach gives correct solutions: why? Any insight or direction is greatly appreciated.