Galerkin conditions

Define two sets of bases for \(\psi(x) = \sum_i z_i \phi_i(x)\) and \(u(x) = \sum_j w_j \phi_j(x)\). Then, we have \(i = 1,...,m\) constraints:

\[ \sum_{j=1}^m \left[\int_a^b c(x)\phi_i'(x)\phi_j'(x) dx + \int_a^b s(x)\phi_i(x)\phi_j(x)dx \right] = \int_a^b f(x)\phi_i(x)dx \]

Define matrices to represent the system of equations:

\[ (\mathbf{K} + \mathbf{M})\mathbf{w} = \mathbf{f}, \] where \(\mathbf{K}\) is the stiffness and \(\mathbf{M}\) is the mass.