Is the linear combination of two solutions of a nonhomogeneous differential equation also a solution

Solution 1:

Converting my comment into an answer, with more details and precision.

Take your diff. eqn. replace $y$ by $y_1$, it is a valid eqn because $y_1$ is a solution. Call this eqn by the name, E1. Similarly you get E2, using the other solution $y_2$. Now substitute a linear combination, $ay_1+by_2$ into the original equation, and you will get (using E1, and E2) it simplifies to $a+b$ and not 1, and hence the linear combination can be a solution if and only if $a+b=1$.