# Why do particular solutions of ordinary, non-homogeneous differential equations not contains arbitrary constants, but homogeneous solutions do?

I've been solving ordinary linear differential equations for a while. First order and second order mostly, utilizing a slew of methods and theorems to find particular and complementary solutions.

I still don't quite understand the intuition behind the fact that when I find a solution to a non-homogeneous equation it doesn't contain arbitrary constants like what happens when I find a general solution to the associated homogeneous equation.

In the latter case, I can show that every solution to the homogeneous equation is a linear combination of n linearly independent solutions to the same equation, where n is the order of the (differential) equation. One of such linear combinations is a particular solution to the homogeneous equation.

What is it about adding an input term that makes it so that the same result (n l.i. solutions form a basis for all other solutions) doesn't apply to particular solutions to the non-homogeneous equation?

In other words, why do particular solutions of non-homogeneous equations not contain arbitrary constants?

Let's consider the second order ODE with constant coefficients

$$ay''+by'+cy=0\quad (1)$$ $$ay''+by'+cy=f\quad (2)$$

with linearly independent solutions $$y_1$$ and $$y_2$$ for the homogenous problem and $$y_p$$ the particular solution. Then we have

$$ay_1''+by_1'+cy_1=0$$

but then

$$c_1\left(ay_1''+by_1'+cy_1\right)=a(c_1y_1)''+b(c_1y_1)'+c(c_1y_1)=0$$

for any constant $$c_1$$, since the RHS will also be zero. Note that the same doesn't work if we multiply by a function $$g(x)$$. Thus $$c_1y_1$$ is also a solution to $$(1)$$, and similarly $$c_2y_2$$ is also a solution for any constant $$c_2$$. However, $$y_1-y_2$$, $$-24y_1+50y_2$$,... are also solutions of $$(1)$$ (any linear combination of $$y_1$$ and $$y_2$$) and we can write

$$\{ay_1+by_2\space |\space a,b\in\mathbb{R}\}$$

for the general homogenous solution.

Is the same true for the particular solution?

We know the particular solution satisfies

$$ay_p''+by_p'+cy_p=f$$

Now let's multiply by some constant $$c_3$$

$$c_3\left(ay_p''+by_p'+cy_p\right)=a\left(c_3y_p\right)''+b\left(c_3y_p\right)'+c\left(c_3y_p\right)=\color{red}{c_3}f$$

and the only value of $$c_3$$ which satisfies $$(2)$$ is $$c_3=1$$, since the RHS is $$f$$ and not zero. Thus, the particular solution of the non-homogenous problem does not contain any arbitrary constants since it must give the RHS exactly.

Remember from linear algebra that the solutions to $$A x = b$$ (where $$A$$ is a given matrix and $$b$$ a given vector) have the form $$x = x_0 + w$$, where $$x_0$$ is some particular solution and $$w$$ is any solution to $$Aw = 0$$. If we have a basis $$w_1, \ldots, w_m$$ for the kernel of $$A$$, then we can write all solutions as $$x = x_0 + c_1 w_1 + \cdots + c_m w_m$$, where $$c_1, \ldots, c_m$$ are scalars. Notice that$$x_0$$ doesn't have a coefficient: if $$A x_0 = b$$ then $$A (c x_0)$$ equals $$cb$$, not $$b$$. But there is some arbitrariness in our choice of base point $$x_0$$: in principle, we could choose $$x_0$$ to be any solution to $$A x = b$$, because the difference between any two possible base points is itself a solution to $$Ax = 0$$.

For differential equations, it might help your intuition if we invent some new notation to make them look more like matrix equations. Let's say you're trying to solve $$\frac{d^2 y}{dx^2} + 2 \frac{dy}{dx} - 3y = 0.$$ Let's call the set of smooth real functions $$\mathcal{C}^\infty(\mathbb{R})$$. Let's write $$D$$ for the differential map $$D(f(x)) = \frac{d f(x)}{dx}$$, and write $$I$$ for the identity map. Both $$D$$ and $$I$$ are linear maps in that $$D(k_1 f_1 + k_2 f_2) = k_1 D(f_1) + k_2 D(f_2)$$, and the same for $$I$$.

If we define the linear operator $$A := D^2 + 2D - 3I$$, then the solutions to our differential equation are just the functions $$y = f(x)$$ for which $$A f(x) = 0$$, so solving a differential equation is just finding the kernel of a linear operator. I'm sure you know the standard methods for this, but it might help seeing them justified in linear algebra language:

1. You can "factor" $$A$$ as $$(D + 3I)(D - I)$$, so if $$f$$ satisfies $$(D - I) f = 0$$ (that is, $$\frac{df(x)}{dx} - f(x) = 0$$), then it also satisfies $$A f = (D + 3I) 0 = 0$$. (The functions $$f$$ that work here are of course $$f(x) = c e^x$$.)

2. The factors of $$A$$ commute, so you could also write $$A = (D -I)(D + 3I)$$ and show that $$f(x) = e^{-3x}$$ also works.

3. The sum of any two equations that satisfy $$Af = 0$$ also satisfies the equation, so any function of the form $$f(x) = c_1 e^x + c_2 e^{-3x}$$ also works.

4. In fact, all solutions to $$Af = 0$$ are of this form: the uniqueness theorem for first-order differential equations says that $$D-I$$ and $$D+3I$$ have kernels of dimension 1, so their composition $$A$$ has kernel of dimension at most 2 (in general in linear algebra, $$\dim \ker (AB) \leq \dim \ker A + \dim \ker B$$, even if $$A$$ and $$B$$ are maps over spaces of infinite dimension).

Now, suppose you wanted to solve an equation of the form $$\frac{d^2 y}{dx^2} + 2 \frac{dy}{dx} - 3y = r(x).$$ That is, we need need to find the functions $$f$$ such that $$Af = r$$. This equation should look a bit more like $$Ax=b$$ in our discussion of plain linear algebra than like $$Ax = 0$$. If $$f_0$$ is some solution to $$Af = r$$, then every solution $$f$$ must have the form $$f(x) = f_0(x) + c_1 e^x + c_2 e^{-3x}$$, because if $$f$$ solves $$Af = r$$, then $$f - f_0$$ must solve $$A(f - f_0) = Af - Af_0 = r - r = 0$$. But arbitrary multiples of $$f_0$$ aren't solutions themselves: if $$A f_0(x) = r(x)$$, then $$A (k f_0 (x)) = k r(x)$$. The "arbitrariness" of $$f_0$$ as a basepoint comes from the fact that we could replace it with any other solution to the inhomogeneous equation, not that we can change coefficients in it and also get solutions

As an example: if $$r(x) = -3x$$, then one possible special solution is $$f_0(x) = x + \frac{2}{3}$$. It's easy to show that $$y = x + \frac{2}{3}$$ is the only function of the form $$y = ax + b$$ (in fact, the only polynomial) that satisfies $$\frac{d^2 y}{dx^2} + 2 \frac{dy}{dx} - 3y = -3x$$, and that the general solution to the differential equation is thus $$y = c_1 e^x + c_2 e^{-3x} + x + \frac{2}{3}$$. Of course, we could have chosen a different special solution, say $$f_0(x) = x + \frac{2}{3} + \pi e^{x} - \sqrt{17} e^{-3x}$$ instead. This choice gives us much uglier formulas, but there's nothing strictly speaking wrong with it.