# general solution of linear differential equation

The general solution $y$ of the nonhomogeneous linear differential equation

 $\frac{d^{n}y}{dx^{n}}+P_{1}(x)\frac{d^{n-1}y}{dx^{n-1}}+\cdots+P_{n-1}(x)\frac% {dy}{dx}+P_{n}(x)y=Q(x)$

is gotten by adding the general solution $\bar{y}$ of the corresponding homogeneous equation

 $\frac{d^{n}\bar{y}}{dx^{n}}+P_{1}(x)\frac{d^{n-1}\bar{y}}{dx^{n-1}}+\cdots+P_{% n-1}(x)\frac{d\bar{y}}{dx}+P_{n}(x)\bar{y}=0$

to some particular solution of the nonhomogeneous equation.

The general solution of the homogeneous equation has the form

 $\displaystyle\bar{y}=C_{1}y_{1}+C_{2}y_{2}+\cdots+C_{n}y_{n}$ (1)

where  $y_{1},\,y_{2},\,\ldots,\,y_{n}$  are linearly independent  solutions of the equation.  A particular solution of the nonhomogeneous equation can be obtained by using the method of variation of constants$C_{1},\,C_{2},\,\ldots,\,C_{n}$  in (1).

Example 1.  Find the general solution of the nonhomogeneous linear second order differential equation

 $\displaystyle\frac{d^{2}y}{dx^{2}}-4y=e^{x}.$ (2)

The corresponding homogeneous equation  $\displaystyle\frac{d^{2}\bar{y}}{dx^{2}}=4\bar{y}$  has apparently the linearly independent solutions $\bar{y}=e^{\pm 2x}$  and thus the general solution  $\bar{y}=C_{1}e^{2x}+C_{2}e^{-2x}$.  For finding a particular solution of (2) we variate the constants $C_{1}$, $C_{2}$, i.e. think that

 $C_{1}=C_{1}(x),\,\,C_{2}=C_{2}(x)$

in the sum

 $y=C_{1}e^{2x}+C_{2}e^{-2x}.$

The first derivative  $y^{\prime}=[C_{1}^{\prime}e^{2x}+C_{2}^{\prime}e^{-2x}]+[2C_{1}e^{2x}-2C_{2}e^% {-2x}]$  of it reduces to the latter bracket expression if we set the condition

 $\displaystyle C_{1}^{\prime}e^{2x}+C_{2}^{\prime}e^{-2x}=0.$ (3)

So the second derivative is

 $y^{\prime\prime}=(2C_{1}^{\prime}e^{2x}-2C_{2}^{\prime}e^{-2x})+(4C_{1}e^{2x}+% 4C_{2}e^{-2x}).$

Substituting this and the expression of $y$ in the differential equation (2) gives the equation

 $\displaystyle 2C_{1}^{\prime}e^{2x}-2C_{2}^{\prime}e^{-2x}=e^{x}.$ (4)

Now we have the pair of linear equations formed by (3) and (4) for determining the derivatives $C_{1}^{\prime}$ and $C_{2}^{\prime}$; the result of them is

 $C_{1}^{\prime}=e^{-x}/4,\,\,C_{2}^{\prime}=-e^{3x}/4.$

If we then integrate and chose

 $C_{1}=-e^{-x}/4,\,\,C_{2}=-e^{3x}/12,$

we can form the particular solution

 $y=-\frac{e^{-x}}{4}e^{2x}-\frac{e^{3x}}{12}e^{-2x}\equiv-\frac{e^{x}}{3}.$

Accordingly, the general solution of the nonhomogeneous equation (2) is

 $y=-\frac{e^{x}}{3}+C_{1}e^{2x}+C_{2}e^{-2x}.$

In some cases it is not necessary to use the variation of parameters method above illustrated, but a particular solution may be found at simple sight, as it is the case in the following example about boundary values.

Example 2.  Find the general solution of the nonhomogeneous linear second order differential equation

 $y^{\prime\prime}-y=2x$
 $y(1)=0,\quad y^{\prime}(0)=0.$

The function  $x\mapsto-2x$  is evidently a particular solution of the differential equation. Therefore, the general solution is

 $y(x)=-2x+C_{1}e^{x}+C_{2}e^{-x}.$

Thus we have  $y^{\prime}(x)=-2+C_{1}e^{x}-C_{2}e^{-x}$. By making use of the boundary conditions, we obtain

 $0=y(1)=-2+C_{1}e+C_{2}e^{-1},\qquad 0=y^{\prime}(0)=-2+C_{1}-C_{2}.$

Solving this system of linear equations and introducing $C_{1}$ and $C_{2}$ into the general solution, we have the result

 $y(x)=-2x+\frac{2(e+1)}{e^{2}+1}e^{x}-\frac{2e(e-1)}{e^{2}+1}e^{-x}.$

To solve more advanced problems about nonhomogeneous ordinary linear differential equations of second order with boundary conditions, we may find out a particular solution by using, for instance, the Green’s function method. Thus consider, for instance, the self-adjoint differential equation11Minus sign, on the right-hand member of the equation, it is by convenience in the applications.

 $\frac{d}{dx}\left(p(x)\frac{dy}{dx}\right)+q(x)y=-f(x),\qquad a

The solution of this problem, about boundary values, is known to be given by

 $y(x)=\int_{a}^{b}G(x,\xi)f(\xi)d(\xi),$

where the symmetric function $G(x,\xi)=G(\xi,x)$ 22Some authors call this symmetry reciprocity’s law. is the so-called Green’s function. It satifies the following boundary problem33It is easy verify the details about such statement; it can be found in any good book on mathematical analysis.

 $\displaystyle\begin{cases}\;i)\;\;\frac{d}{dx}\left(p(x)\frac{dG}{dx}\right)+q% (x)G=0,\qquad x\neq\xi.\\ \;ii)\;\;G(a)=G(b)=0,\\ \;iii)\;\;G(\xi^{-})=G(\xi^{+})=0,\\ \;iv)\;\;\frac{dG}{dx}(\xi^{+})-\frac{dG}{dx}(\xi^{-})=-\frac{1}{p(\xi)}.\end{cases}$

From the last two one, we realize that $G$ is continuous at $x=\xi$ while $dG/dx$ has there a jump discontinuity. 44The solution $y(x)$, which is above given, it may be physically interpreted as follows: if $y$ stands for a displacement and $f$ like a force per length unit, then the Green’s function $G(x,\xi)$ corresponds to a displacement at $x$ due a force, of unit magnitude, concentrated at $x=\xi$. Let us see an example.

Example 3.  Consider the problem

 $\displaystyle\begin{cases}\;\frac{d^{2}y}{dx^{2}}=-f(x)\qquad 0

Here, $p(x)\equiv 1$, $q(x)\equiv 0$, $a=0$, $b=1$. So from i) and ii), $d^{2}G/dx^{2}=0$ and therefore

 $G(x,\xi)=\begin{cases}\;C_{1}(\xi)x\qquad x<\xi,\\ \;C_{2}(\xi)(1-x)\qquad x>\xi.\end{cases}$

Since $\xi$ stays fixed on above Green’s conditions, constants $C_{1},C_{2}$ may depend on $\xi$. Further, the symmetry of $G$ demands that $C_{1}(\xi)=C(1-\xi)$, and $C_{2}(\xi)=C\xi$, where $C$ is a constant independent on $\xi$. Then the continuity condition iii) is automatically satisfied, and the jump condition iv) gives

 $\displaystyle(-1)C\xi-C(1-\xi)=-1,$ $\displaystyle\textrm{whence}\qquad C=1.$

Therefore,

 $G(x,\xi)=\begin{cases}\;(1-\xi)x\qquad x\leq\xi,\\ \;(1-x)\xi\qquad x\geq\xi.\end{cases}$

Thus, the solution is

 $y(x)=\int_{0}^{x}(1-x)\xi f(\xi)d\xi+\int_{x}^{1}x(1-\xi)f(\xi)d\xi.$

If, for example, $f(x)\equiv 1$, then we find

 $y(x)=\frac{1}{2}(1-x)x^{2}+\frac{1}{2}x(1-x)^{2}=\frac{1}{2}x(1-x).$

In some cases related to partial differential equations (specially that of hyperbolic type), the method of separation of variables  , splits in ordinary differential equations (possibly with variable coefficients) on boundary values, and one of them usually leading to a Sturm-Liouville problem (basically an eigen-values and eigen-functions problem). The general solution of those partial differential equations generally leads to Bessel-Fourier series, but the details about that question is out of the sight of this entry.

Title general solution of linear differential equation GeneralSolutionOfLinearDifferentialEquation 2013-03-22 16:32:25 2013-03-22 16:32:25 pahio (2872) pahio (2872) 16 pahio (2872) Result msc 15A06 msc 34A05 solution of linear ordinary differential equation LinearProblem SecondOrderLinearDifferentialEquation