Method of undetermined coefficients