Linear non-homogeneous differential equations: adding solutions? I am slightly stuck and was hoping someone could clarify about the superposition of solutions to linear, non-homogeneous differential equations.
I was taught that if you have two solutions to a linear equation, then any linear combination of these two solutions will also be a solution.
But surely this cannot be the case. Say I have the differential equation
$L(y)= a(x)\frac{d^2y}{x^2}+b(x)\frac{dy}{dx}+c(x)y=f(x)$ and I have two solutions $y_1$ and $y_2$, then the sum is not a solution as 
$L(y_1+y_2)=L(y_1)+L(y_2)=2f(x)\neq f(x)$
I have a feeling that I have misunderstood something quite basic here...
 A: The space of solutions of a non-homogeneous linear differential equations is an affine space with direction the vector space of solutions of the associated homogeneous equation.
Indeed, if $y_1$ and $y_2$ are two solutions of the inhomogeneous equation, $y_1-y_2$ is a solution of
$$a(x)y''(x)+by'(x)+c(x) y(x)=f(x)-f(x)=0 $$
Conversely, if y_2(x) is a solution of the inhomogeneous equation and $z(x)$ a solution of  the associated homogeneous  equation, it is easy to check $y_1(x)=y_2(x)+z(x)$ is a solution of the inhomogeneous equation.
Thus to completely solve a linear inhomogeneous differential equation you have to:  1) completely solve the linear homogeneous associated equation; 2) find one solution of the inhomogeneous equation; 3) add any solution of 1) to the particular solution of 2).
A: I see that nobody has actually answered your question - and I was looking for the same thing so I'll pitch in.
If you have two solutions to a linear non-homogeneous differential equation, lets call them $y_1$ and $y_2$ then you have no guarantee that $y_1 + y_2$ is a solution.
Proof:
Let $y_1$ and $y_2$ be two solutions to the general nonhomogenous linear differential equation $\frac{dy}{dt} = a(t)y + b(t)$. Then, the sum $$\frac{dy_1}{dt} + \frac{dy_2}{dt} = a(t)y_1 + b(t) + a(t)y_2 + b(t)$$
can be written as
$$\frac{d(y_1+y_2)}{dt} = a(t)(y_1 + y_2) + 2b(t)$$
which clearly indicates that $y_1 + y_2$ is not a solution to the original ODE unless $b(t) = 0$ for all $t$.
A: You can add a solution to the homogeneous system to anything, Since that solution will give zero, f(x) remains unchanged.
