Constant Coefficient Nonhomogeneous ODEs

A constant coefficient Higher Order Linear Homogeneous ODE can be written as follows: $$ y^{(n)} + a_{n-1} y^{(n-1)} + \cdots + a_1 y' + a_0 y = r(x) $$ If \(r(x)=0\), the equation is said to be homogeneous. The solution to the characteristic equation gives \(n\) linearly independent solutions We need to find a particular solution to the problem to write the general solution $$ y(x) = y_h(x) + y_p(x)$$ The particular solution can be found by guessing the form of the solution if the right hand side has a simple form.

Example 1

Find the general solution of $$ y^{(4)} - y = 1 $$

solution:

The characteristic equation is $$ λ^4 - 1 = 0 $$ with four distinct roots $$ λ_1 = 1, \; λ_2 = -1, \; λ_2 = i, \; λ_2 = -i $$ which gives us the general solution $$ y(x) = c_1 e^{x} + c_2 e^{-x} + c_3 \cos{x} + c_4 \sin{x} $$ a particular solution of the problem is $$ y_p = -1 $$ which can be verified by substitution. Then the general solution is $$ y(x) = c_1 e^{x} + c_2 e^{-x} + c_3 \cos{x} + c_4 \sin{x} - 1 $$

Method of Undetermined Coefficients

A particular solution can be guessed if the right hand side is a polynomial, exponential, trigonometric function or some combination. The method of guessing the particular solution can be made systematic if one can use the following rules. For the problem $$ L(y) = r $$ if the right hand side is of the form $$ r(x) = \left[ a(x) \cos{β x} + b(x) \sin{β x} \right] e^{α x} $$ where $$ a(x) = a_n x^n + a_{n-1} x^{n-1} + ... + a_0 $$ $$ b(x) = b_n x^n + b_{n-1} x^{n-1} + ... + b_0 $$ then the particular solution is of the form $$ y_p(x) = \left[ A(x) \cos{β x} + B(x) \sin{β x} \right] e^{α x} x^k $$ where $$ A(x) = A_n x^n + A_{n-1} x^{n-1} + ... + A_0 $$ $$ B(x) = B_n x^n + B_{n-1} x^{n-1} + ... + B_0 $$ \(α, β\) are constants and \(k\) is a positive integer constant. \(x^k\) term may be necessary to make the particular solution linearly independent from the homogeneous solution. Linearity can be used if the right hands side is a combination of terms given above $$ L(y_{p_1}) = r_1, \; L(y_{p_2}) = r_2 \rightarrow L(y_{p_1}+y_{p_2}) = r_1 + r_2 $$ $$ r = r_1 + r_2 \rightarrow y_p = y_{p_1}+y_{p_2}$$

Example 2

Find the general solution of $$ y^{(3)} - y'' + y' - y = e^x + \sin{x} $$

solution:

The characteristic equation is $$ λ^3 - λ^2 + λ - 1 = (λ - 1)(λ^2 + 1)0 $$ with three distinct roots $$ λ_1 = 1, \; λ_2 = -1, \; λ_2 = i, \; λ_2 = -i $$ The homogeneous solution $$ y_h(x) = c_1 \cos{x} + c_2 \sin{x} + c_3 e^x $$ The particular solution will have the form $$ y_p(x) = A x e^x + x (B \cos{x} + C \sin{x}) $$ substitution gives the undetermined coefficients $$ A = \frac{1}{2}, B= \frac{1}{4}, c= -\frac{1}{4} $$ the general solution is $$ y(x) = c_1 \cos{x} + c_2 \sin{x} + c_3 e^x + \frac{1}{2} x e^x + x (\frac{1}{4} \cos{x} - \frac{1}{4} \sin{x}) $$