I use piecewise linear function to approximate the solution to a boundary value problem.
The Rayleigh-Ritz method is a method used to approximating boundary value problems —- this method is a variational technique.
Sufficiently differentiable functions which satisfy the boundary conditions are chosen as basis functions, in this case we choose a set of piecewise linear functions to approximate the solution.