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

ordinary differential equations

The question reads, if y1 and y2 are solutions of:

$y''+x^2y'-e^xy=1$

then is any linear combination of y1, y2 also a solution.

I know for a fact that the above statement is true for homogeneous equations; however does it still hold for the nonhomogeneous equation. Since y1 or y2 could be the particular solution rather than both being the part of the complementary solution I am unsure.

Thanks for your help.

Best Answer

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$.

Related Question