# Differential Equations

Nth Order Equations# Higher Order Linear Nonhomogeneous Differential Equations with Variable Coefficients

Theory

Problem 1

To complete the picture we must also consider the nonhomogeneous equations with variable coefficients. Equations of this type can be written as

where the coefficients \({a_1}\left( x \right), \ldots ,{a_n}\left( x \right)\) and the right-hand side \(f\left( x \right)\) are continuous functions on some interval \(\left[ {a,b} \right].\)

With the help of a linear differential operator \(L\) this equation can be written in compact form:

where \(L\) includes the operations of differentiation, multiplication by the coefficients \({a_i}\left( x \right),\) and addition.

As it is known, the general solution \(y\left( x \right)\) of a nonhomogeneous differential 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:

Methods of finding the general solution of the homogeneous equation are considered here. Therefore, we focus our attention on constructing solutions of the nonhomogeneous equations.

The method of variation of constants also known as the Lagrange method is commonly used for this purpose. With this method, we can obtain the general solution of the nonhomogeneous equation, if the general solution of the homogeneous equation is known.

### Method of Variation of Constants

Suppose we want to solve an \(n\)th order nonhomogeneous differential equation:

We will assume that the general solution of the associated homogeneous equation is found and expressed by the formula

containing \(n\) arbitrary constants \({C_1},\) \({C_2}, \ldots ,\) \({C_n}.\)

The idea of this method is to replace the constants \({C_1},\) \({C_2}, \ldots ,\) \({C_n}\) with continuously differentiable functions \({C_1}\left( x \right),\) \({C_2}\left( x \right), \ldots ,\) \({C_n}\left( x \right),\) which are chosen so that the solution

{y\left( x \right) }={ {C_1}\left( x \right){Y_1}\left( x \right) }+{ {C_2}\left( x \right){Y_2}\left( x \right) + \cdots }

+ {{C_n}\left( x \right){Y_n}\left( x \right) }

= {\sum\limits_{i = 1}^n {{C_i}\left( x \right){Y_i}\left( x \right)} }

\]

satisfies the nonhomogeneous differential equation.

The first derivatives of the functions \({{C_i}\left( x \right)}\) are determined from the system of \(n\) equations of the form

{{C’_1}\left( x \right){Y_1}\left( x \right) }+{ {C’_2}\left( x \right){Y_2}\left( x \right) + \cdots }+{ {C’_n}\left( x \right){Y_n}\left( x \right) }={ 0}\\

{{C’_1}\left( x \right){Y’_1}\left( x \right) }+{ {C’_2}\left( x \right){Y’_2}\left( x \right) + \cdots }+{ {C’_n}\left( x \right){Y’_n}\left( x \right) }={ 0}\\

\cdots \cdots \cdots \cdots \cdots \cdots \cdots \\

{{C’_1}\left( x \right)Y_1^{\left( {n – 1} \right)}\left( x \right) }+{ {C’_2}\left( x \right)Y_2^{\left( {n – 1} \right)}\left( x \right) + \cdots }+{ {C’_n}\left( x \right)Y_n^{\left( {n – 1} \right)}\left( x \right) }={ f\left( x \right)}

\end{array} \right.\]

Note that the main determinant of this system is the Wronskian \(W\left( x \right)\) constructed on the basis of the fundamental system of solutions \({Y_1},\) \({Y_2}, \ldots ,\) \({Y_n}.\) As the solutions \({Y_1},\) \({Y_2}, \ldots ,\) \({Y_n}\) are linearly independent, the Wronskian is not zero.

The unknown derivatives \({C’_i}\left( x \right)\) are calculated by Cramer’s rule:

where the determinant \({{W_i}\left( x \right)}\) is obtained from the Wronskian \(W\left( x \right)\) by replacing the \(i\)th column with the column \(\left[ {0,0, \ldots, f\left( x \right)} \right]\) on the right side.

Further, the expressions for \({C_i}\left( x \right)\) can be found by integration:

{{C_i}\left( x \right) }={ \int {\frac{{{W_i}\left( x \right)}}{{W\left( x \right)}}dx} + {A_i},\;\;}\kern-0.3pt

{i = 1,2, \ldots ,n.}

\]

Here \({A_i}\) denote constants of integration.

As a result, the general solution of the nonhomogeneous equation can be written as

{y\left( x \right) }={ \sum\limits_{i = 1}^n {{C_i}\left( x \right){Y_i}\left( x \right)} }

= {\sum\limits_{i = 1}^n {\left( {\int {\frac{{{W_i}\left( x \right)}}{{W\left( x \right)}}dx} + {A_i}} \right){Y_i}\left( x \right)} }

= {\sum\limits_{i = 1}^n {{A_i}{Y_i}\left( x \right)} }

+ {\sum\limits_{i = 1}^n {\left( {\int {\frac{{{W_i}\left( x \right)}}{{W\left( x \right)}}dx} } \right){Y_i}\left( x \right)} }

= {{y_0}\left( x \right) + {y_1}\left( x \right).}

\]

In the last expression, the first sum corresponds to the general solution \({y_0}\left( x \right)\) of the homogeneous equation (with arbitrary numbers \({A_i}\)), and the second sum describes a particular solution \({y_1}\left( x \right)\) of the nonhomogeneous equation.

## Solved Problems

Click on problem description to see solution.

### ✓ Example 1

Find the general solution of the differential equation

Theory

Problem 1

### Related Pages

- Higher Order Linear Homogeneous Differential Equations with Constant Coefficients
- Higher Order Linear Nonhomogeneous Differential Equations with Constant Coefficients
- Higher Order Linear Homogeneous Differential Equations with Variable Coefficients
- Second Order Linear Homogeneous Differential Equations with Constant Coefficients
- Second Order Linear Nonhomogeneous Differential Equations with Constant Coefficients
- Second Order Linear Homogeneous Differential Equations with Variable Coefficients
- Second Order Linear Nonhomogeneous Differential Equations with Variable Coefficients