Consider a linear non-homogeneous ordinary differential equation of the form
The method of undetermined coefficients provides a straightforward method of obtaining the solution to this ODE when two criteria are met:2
The method consists of finding the general homogeneous solution y c {\displaystyle y_{c}} for the complementary linear homogeneous differential equation
and a particular integral y p {\displaystyle y_{p}} of the linear non-homogeneous ordinary differential equation based on g ( x ) {\displaystyle g(x)} . Then the general solution y {\displaystyle y} to the linear non-homogeneous ordinary differential equation would be
If g ( x ) {\displaystyle g(x)} consists of the sum of two functions h ( x ) + w ( x ) {\displaystyle h(x)+w(x)} and we say that y p 1 {\displaystyle y_{p_{1}}} is the solution based on h ( x ) {\displaystyle h(x)} and y p 2 {\displaystyle y_{p_{2}}} the solution based on w ( x ) {\displaystyle w(x)} . Then, using a superposition principle, we can say that the particular integral y p {\displaystyle y_{p}} is4
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.
∑ i = 0 n K i x i {\displaystyle \sum _{i=0}^{n}K_{i}x^{i}\!}
K cos ( a x ) + M sin ( a x ) {\displaystyle K\cos(ax)+M\sin(ax)\!}
e a x ( K cos ( b x ) + M sin ( b x ) ) {\displaystyle e^{ax}(K\cos(bx)+M\sin(bx))\!}
( ∑ i = 0 n Q i x i ) cos ( b x ) + ( ∑ i = 0 n R i x i ) sin ( b x ) {\displaystyle \left(\sum _{i=0}^{n}Q_{i}x^{i}\right)\cos(bx)+\left(\sum _{i=0}^{n}R_{i}x^{i}\right)\sin(bx)}
e a x ( ( ∑ i = 0 n Q i x i ) cos ( b x ) + ( ∑ i = 0 n R i x i ) sin ( b x ) ) {\displaystyle e^{ax}\left(\left(\sum _{i=0}^{n}Q_{i}x^{i}\right)\cos(bx)+\left(\sum _{i=0}^{n}R_{i}x^{i}\right)\sin(bx)\right)}
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.5
Find a particular integral of the equation
The right side t cos t has the form
with n = 2, α = 0, and β = 1.
Since α + iβ = i is a simple root of the characteristic equation
we should try a particular integral of the form
Substituting yp into the differential equation, we have the identity
Comparing both sides, we have
which has the solution
We then have a particular integral
Consider the following linear nonhomogeneous differential equation:
This is like the first example above, except that the nonhomogeneous part ( e x {\displaystyle e^{x}} ) is not linearly independent to the general solution of the homogeneous part ( c 1 e x {\displaystyle c_{1}e^{x}} ); as a result, we have to multiply our guess by a sufficiently large power of x to make it linearly independent.
Here our guess becomes:
By substituting this function and its derivative into the differential equation, one can solve for A:
So, the general solution to this differential equation is:
Find the general solution of the equation:
t 2 {\displaystyle t^{2}} is a polynomial of degree 2, so we look for a solution using the same form,
Plugging this particular function into the original equation yields,
which gives:
Solving for constants we get:
To solve for the general solution,
where y c {\displaystyle y_{c}} is the homogeneous solution y c = c 1 e − t {\displaystyle y_{c}=c_{1}e^{-t}} , therefore, the general solution is:
Ralph P. Grimaldi (2000). "Nonhomogeneous Recurrence Relations". Section 3.3.3 of Handbook of Discrete and Combinatorial Mathematics. Kenneth H. Rosen, ed. CRC Press. ISBN 0-8493-0149-1. /wiki/ISBN_(identifier) ↩
Zill, Dennis G., Warren S. Wright (2014). Advanced Engineering Mathematics. Jones and Bartlett. p. 125. ISBN 978-1-4496-7977-4.{{cite book}}: CS1 maint: multiple names: authors list (link) 978-1-4496-7977-4 ↩
Dennis G. Zill (14 May 2008). A First Course in Differential Equations. Cengage Learning. ISBN 978-0-495-10824-5. 978-0-495-10824-5 ↩