Galerkin conditions

Define two sets of bases for ψ(x)=iziϕi(x) and u(x)=jwjϕj(x). Then, we have i=1,...,m constraints:

mj=1[bac(x)ϕi(x)ϕj(x)dx+bas(x)ϕi(x)ϕj(x)dx]=baf(x)ϕi(x)dx

Define matrices to represent the system of equations:

(K+M)w=f, where K is the stiffness and M is the mass.