No, the coefficients need to be constant, not a function in terms of the independent variable. The method of undetermined coefficients is a special case method. Even without studying this, you will need to still study higher order differential equations. The variation of parameters method is one example to this.