Initial-value problem and method of undetermined coefficients