solution of a boundary-value problem for a given differential equation by expanding the