# Higher Order Linear Nonhomogeneous Differential Equations with Constant Coefficients

These equations have the form

where \({a_1},{a_2}, \ldots ,{a_n}\) are real or complex numbers, and the right-hand side \(f\left( x \right)\) is a continuous function on some interval \(\left[ {a,b} \right].\)

Using the linear differential operator \(L\left( D \right)\) equal to

the nonhomogeneous differential equation can be written as

The general solution \(y\left( x \right)\) of the nonhomogeneous equation is the sum of the general solution \({y_0}\left( x \right)\) of the corresponding homogeneous equation and a particular solution \({y_1}\left( x \right)\) of the nonhomogeneous equation:

For an arbitrary right side \(f\left( x \right)\), the general solution of the nonhomogeneous equation can be found using the method of variation of parameters. If the right-hand side is the product of a polynomial and exponential functions, it is more convenient to seek a particular solution by the method of undetermined coefficients.

## Method of Variation of Parameters

We assume that the general solution of the homogeneous differential equation of the \(n\)th order is known and given by

According to the method of variation of constants (or Lagrange method), we consider the functions \({C_1}\left( x \right),\) \({C_2}\left( x \right), \ldots ,\) \({C_n}\left( x \right)\) instead of the regular numbers \({C_1},\) \({C_2}, \ldots ,\) \({C_n}.\) These functions are chosen so that the solution

satisfies the original nonhomogeneous equation.

The derivatives of \(n\) unknown functions \({C_1}\left( x \right),\) \({C_2}\left( x \right), \ldots ,\) \({C_n}\left( x \right)\) are determined from the system of \(n\) equations:

The determinant of this system is the Wronskian of \({Y_1},\) \({Y_2}, \ldots ,\) \({Y_n}\) forming a fundamental system of solutions. By the linear independence of these functions, the determinant is not zero and the system is uniquely solvable. The final expressions for the functions \({C_1}\left( x \right),\) \({C_2}\left( x \right), \ldots ,\) \({C_n}\left( x \right)\) can be found by integration.

## Method of Undetermined Coefficients

If the right-hand side \(f\left( x \right)\) of the differential equation is a function of the form

where \({P_n}\left( x \right),\) \({Q_m}\left( x \right)\) are polynomials of degree \(n\) and \(m,\) respectively, then the method of undetermined coefficients may be used to find a particular solution.

In this case, we seek a particular solution in the form corresponding to the structure of the right-hand side of the equation. For example, if the function has the form

the particular solution is given by

where \({A_n}\left( x \right)\) is a polynomial of the same degree \(n\) as \({P_n}\left( x \right).\) The coefficients of the polynomial \({A_n}\left( x \right)\) are determined by direct substitution of the trial solution \({y_1}\left( x \right)\) in the nonhomogeneous differential equation.

In the so-called resonance case, when the number of \(\alpha\) in the exponential function coincides with a root of the characteristic equation, an additional factor \({x^s},\) where s is the multiplicity of the root, appears in the particular solution. In the *non-resonance case*, we set \(s = 0.\)

The same algorithm is used when the right-hand side of the equation is given in the form

Here the particular solution has a similar structure and can be written as

where \({{A_n}\left( x \right)},\) \({{B_n}\left( x \right)}\) are polynomials of degree \(n\) (for \(n \ge m\)), and the degree \(s\) in the additional factor \({x^s}\) is equal to the multiplicity of the complex root \(\alpha \pm \beta i\) in the resonance case (i.e. when the numbers \(\alpha\) and \(\beta\) coincide with the complex root of the characteristic equation), and accordingly, \(s = 0\) in the non-resonance case.

## Superposition Principle

The superposition principle is stated as follows. Let the right-hand side \(f\left( x \right)\) be the sum of two functions:

Suppose that \({y_1}\left( x \right)\) is a solution of the equation

and the function \({y_2}\left( x \right)\) is, accordingly, a solution of the second equation

Then the sum of the functions

will be a solution of the linear nonhomogeneous equation