In mathematics, the method of undetermined coefficients is an approach to finding a particular solution to certain nonhomogeneous ordinary differential equations and recurrence relations. It is closely related to the annihilator method, but instead of using a particular kind of differential operator (the annihilator) in order to find the best possible form of the particular solution, an ansatz or 'guess' is made as to the appropriate form, which is then tested by differentiating the resulting equation. For complex equations, the annihilator method or variation of parameters is less time-consuming to perform. Undetermined coefficients is not as general a method as variation of parameters, since it only works for differential equations that follow certain forms. Description of the method Consider a linear non-homogeneous ordinary differential equation of the form where denotes the i-th derivative of , and denotes a function of . The method of undetermined coefficients provides a straightforward method of obtaining the solution to this ODE when two criteria are met: are constants. g(x) is a constant, a polynomial function, exponential function , sine or cosine functions or , or finite sums and products of these functions (, constants). The method consists of finding the general homogeneous solution for the complementary linear homogeneous differential equation and a particular integral of the linear non-homogeneous ordinary differential equation based on . Then the general solution to the linear non-homogeneous ordinary differential equation would be If consists of the sum of two functions and we say that is the solution based on and the solution based on . Then, using a superposition principle, we can say that the particular integral is Typical forms of the particular integral In order to find the particular integral, we need to 'guess' its form, with some coefficients left as variables to be solved for. This takes the form of the first derivative of the complementary function. Below is a table of some typical functions and the solution to guess for them. If a term in the above particular integral for y appears in the homogeneous solution, it is necessary to multiply by a sufficiently large power of x in order to make the solution independent. If the function of x is a sum of terms in the above table, the particular integral can be guessed using a sum of the corresponding terms for y. Examples Example 1 Find a particular integral of the equation The right