# Concerning the solution to the non-homgeneous second order ODE

Does any second order linear differential equation have two linearly independent solution ?

What about the non-homogeneous DE of the form $$y''+ay'+by=f(x)$$ I know that it has as solution $$y=c_1y_1+c_2y_2+y_p$$ where $$c_1y_1+c_2y_2$$ is the solution to the homogeneous part .

While $$y_p$$ is the particular solution due to non-homogeneous part.

My question :Does this mean that the equation has three independent solutions ?$$y1 , y_2 , y_p$$

• $y_1$ and $y_2$ are not solutions to the equation you have, only to the associated homogeneous equation. Furthermore, you have a infinite number of solutions to your equation parametrized by $c_1$ and $c_2$. – Tony Oct 24 '17 at 18:31
• No. Actually, you have a 2-dimensional $\mathbb{R}$-linear space spanned by $y_1$ and $y_2$ translated by $y_p$ (affine space). – Wang Oct 24 '17 at 18:42

No, because there isn't an arbitrary constant in front of $y_p$. Roughly speaking, the magnitude of the particular solution $y_p$ is determined by the "source term" $f(x)$; you can't double $y_p$ and still have a solution as you can with the independent homogeneous solutions $y_1$ and $y_2$.

As an example, consider the first-order ODE $$y' + y = A (\sin x + \cos x)$$ for some constant $A \neq 0$. The homogenous solution (only one, since this is a first-order equation) is $$y_1(x) = e^{-x}$$ while the* particular solution is $$y_p(x) = A \sin x.$$ The general solution is therefore $$y(x) = c_1 e^{-x} + A \sin x.$$ But there is still only one free parameter in the solution, since this is a first-order ODE. In particular, it's not too hard to show that $$\tilde{y}(x) = c_1 y_1(x) + 2 y_2(x)$$ is not a solution of the original ODE; just plug it in to the ODE to see this.

In fact, it's not really great to talk about the space of solutions of a non-homogeneous ODE as being "linearly independent", since this implicitly invokes the idea that they are vectors that we can add together. For a homogeneous linear ODE, this is valid, since the linear combination of any two solutions is also a solution. But the set of solutions of a non-homogeneous linear ODE does not form a vector space. (In particular, this set will not contain the element $y(x) = 0$.) As noted by @Wang in the comments, the space of solutions is an affine space rather than a vector space.

(Aside: I should also note that there isn't a unique particular solution to a non-homogeneous ODE. Given a particular solution $y_p(x)$, it's always possible to find another particular solution $\tilde{y}_p(x)$ that differs from $y_p(x)$ by a combination of the homogeneous solutions. This doesn't affect the overall structure of the solution, since these differences can just be absorbed into the coefficients of the homogeneous solutions in the complete general solution. But it can confuse students who are learning the material when they find a particular solution for an ODE, compare it to the answer in the back of the book, discover that their answer is "wrong", and not realize that their solution differs from the back-of-the-book solution by a multiple of one of the homogeneous solutions.)

As said by @Tony, $y_1$ and $y_2$ are not solutions to the non-homogeneous equation.

The general solution can be seen as an "affine" combination of some solution of the NH-ODE and two linearly independent solutions of the H-ODE, with arbitrary coefficients. It represents a double infinity of solutions, from which you can select a member by specifying two constraints, which determine the two unknown coefficients.

If you want three particular independent solutions, you can pick $y_p, y_p+y_1$ and $y_p+y_2$ (a "canonical basis"), but there are many other possibilities.

Note that $y_p$ is certainly linearly independent of $y_1$ and $y_2$, otherwise the ODE would be homogeneous.

• So the rule that says "the general solution of the second order ODE contains 2 independent solutions " is not correct unless we are talking about an homogeneous ODE. Right ? – MCS Oct 24 '17 at 20:50
• @Sousa: I wouldn't say that. A general solution of a non-homogenous linear ODE can always be written in the form $y = y_p + c_1 y_1 + c_2 y_2$. It would be misleading to say that this solution does not "contain two independent solutions". However, the statement "the general solution of a second-order ODE is the linear combination of two independent solutions" is only true for linear homogeneous ODEs. – Michael Seifert Nov 5 '17 at 18:13
• @Sousa: no, wrong. – Yves Daoust Nov 5 '17 at 19:10
• YvesDaoust: I'm agreeing with you here; my comment was meant to correct @Sousa's statement, by pointing out a common statement about homogeneous ODEs that isn't true for non-homogeneous ones. Sorry if that wasn't clear. – Michael Seifert Nov 5 '17 at 21:33

Lets see...

So we have a nonhomogenous linear ODE in the form of y" + p(x)y' + q(x)y = r(x)

The general solution of y" + p(x)y' + q(x)y = r(x) is the sum of (1) the general solution of the homogenous linear ODE y" + p(x)y' + q(x)y = 0 and (2) the particular solution of y" + p(x)y' + q(x)y = r(x).

So lets start with (1) the general solution of y" + p(x)y' + q(x)y = 0.

We know that the solution is y = c1y1 + c2y2 We will designate this as yh(x)

Now, with (2) solution of y" + p(x)y' + q(x)y = r(x)

We will designate yp(x) as any solution of y" + p(x)y' + q(x)y = r(x)

We get a particular solution of y" + p(x)y' + q(x)y = r(x) when specific values are assigned to the arbitrary constants of yh(x) of

y(x) = yh(x) + yp(x)

The relation between the solutions are as follows: 1. The sum of a solution of y" + p(x)y' + r(x)y = r(x) and a solution of y" + p(x)y' + r(x)y = 0 [yh(x) + yp(x)] is a solution of y" + p(x)y' + q(x)y = r(x) 2. If there are two solutions of y" + p(x)y' + r(x)y = r(x), the difference is a solution of y" + p(x)y' + r(x)y = 0

So, I do not think y1 is an independent solution of the nonhomogenous linear ODE, and y2 is not either. However, yp is a solution of the nonhomogenous linear ODE on an open interval containing no arbitrary constants.

New contributor
Candace Agonafir is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.