Why is the general solution to a inhomogeneous equation the particular solution added with the solution to the respective homogeneous equation?
Whenever I ask why I'm told to not worry about it, but I have a hard time doing something I do not understand.
Suppose I am asked to find a function y that satisfies the equation:
$$y' + 3y = 6x+5$$
My math teacher told me to first find a particular solution generalized as $ax+b$: $$y' + 3y = 6x+5$$ $$a + 3ax+3b = 6x+5$$ And thus I get an equation system: $3a = 6, a+3b = 5$ A particular solution is $2x + 1$
Now to the part I do not understand. Why do we get the general solution by adding the function that satisfies $y' + 3y = 0$?
If $h(x)$ is a solution of the homogeneous equation $y'+ay=0$ and $s(x)$ a solution of $y'+ay=g(x)$ deriving the sum $h(x)+s(x)$ we get $$h'(x)+s'(x)=-ah(x)-as(x)+g(x)$$ and this shows that $h+s$ is another solution of the equation with non zero RHS. More intuitively the solutions of the homogeneous form a one dimensional vector space and the solution of the non homogeneous is an affine space with the previous vector space as a direction