Why is the solution to a nonhomogeneous differential equation the complementary solution + a particular solution? Why does only one particular solution allow enough degrees of freedom for the general solution?
 A: This is an elementary but very important fact for any linear operators. That is, let $A$ be a linear operator, $A\colon U\longrightarrow V$. Consider the problem
$$
A(u)=v,\tag{1}
$$
that is, to find a $u\in U$ for a given $v\in V$. Assume that such solution exists. Then it is true that the general solution to $(1)$ can be written
$$
u_g=u_h+u_p,
$$
where $u_h\in\ker A$, that is, solves homogeneous equation $A(u)=0$ and $u_p$ is any particular solution to $(1)$.
Proof: First, using the linearity of $A$ show that if $u_1$ and $u_2$ solve $(1)$ then $u_1-u_2$ solves $A(u)=0$. Now, assume that some specific $u_p$ solves $(1)$ and let $u_h$ be a solution to $A(u)=0$. Then, clearly, $u_p+u_h$ also solves $(1)$. Now take any $u_g$ that solves $(1)$. Again, $u_g-u_p$ solves $A(u)=0$ and hence $u-u_p=u_h$ from where
$$
u_g=u_h+u_p.
$$
A: This only works if the differential equation is linear, so it can be expressed as $Lx=y$, where $L$ is a linear differential operator. Then it is a basic theorem of linear algebra that if $x$ is some solution, then any solution is of the form $x+a$, where $La=0$.


*

*First, applying $L$ to $x+a$, we find $L(x+a)=Lx+La=Lx+0=Lx=y$, where we used the linearity of $L$ and that $x$ is a solution. Thus, we see that $x+a$ is indeed a solution.

*Second, if $x'$ is another solution, define $a=x'-x$, so that $x'=x+a$. Then $La=L(x'-x)=Lx'-Lx=y-y=0$, thus $La=0$, as desired.
