Linear Differential Equations of higher order I am studying the basics of linear differential equations.
$$\displaystyle \frac{d^ny}{dx^n}+k_1\frac{d^{n-1}y}{dx^{n-1}}+k_2\frac{d^{n-2}y}{dx^{n-2}}+\cdots+k_ny=X$$
First the complementary function is found via 
$$\displaystyle \frac{d^ny}{dx^n}+k_1\frac{d^{n-1}y}{dx^{n-1}}+k_2\frac{d^{n-2}y}{dx^{n-2}}+\cdots+k_ny=0$$
Then the particular integral is found using 
$$\displaystyle \frac{d^ny}{dx^n}+k_1\frac{d^{n-1}y}{dx^{n-1}}+k_2\frac{d^{n-2}y}{dx^{n-2}}+\cdots+k_ny=X$$
I did not understand the logic or derivation behind this. Its not like I have another way to solve them, but can anyone help in explaing the intuition behind this.
 A: Let's look at an example first. Consider the very simple first order linear equation
$$\dfrac{dy}{dx} = 2x$$
Integrating this, we easily get a solution $y_p = x^2$. This is a particular solution or particular integral. The more general solution, as we know, is $y = x^2 + c$.
Why? Because $y_c = c$ is a solution of the homogeneous equation $\dfrac{dy}{dx} = 0$. So what happens is, if $y = y_p + y_c$, then $\dfrac{dy}{dx} = \dfrac{d}{dx}(y_p + y_c) = \dfrac{dy_p}{dx} + \dfrac{dy_c}{dx} = 2x + 0 = 2x$.
This is exactly what happens in the general case. Suppose $y_p$ is a particular integral of the non-homogeneous linear equation
$$\dfrac{d^ny}{dx^n} + k_1\dfrac{d^{n-1}y}{dx^{n-1}} + \cdots + k_n y = X \tag{1}$$
and $y_c$ is the general solution of the homogeneous linear equation
$$\dfrac{d^ny}{dx^n} + k_1\dfrac{d^{n-1}y}{dx^{n-1}} + \cdots + k_n y = 0 \tag{2}$$
Then, substituting $y = y_p + y_c$ in the LHS of $(1)$:
$$\begin{align}
\dfrac{d^ny}{dx^n} + k_1\dfrac{d^{n-1}y}{dx^{n-1}} + \cdots + k_n y
& = \dfrac{d^n(y_p + y_c)}{dx^n} + k_1\dfrac{d^{n-1}(y_p + y_c)}{dx^{n-1}} + \cdots + k_n (y_p + y_c)\\
& = \dfrac{d^ny_p}{dx^n} + k_1\dfrac{d^{n-1}y_p}{dx^{n-1}} + \cdots + k_n y_p + \\
& \qquad \dfrac{d^ny_c}{dx^n} + k_1\dfrac{d^{n-1}y_c}{dx^{n-1}} + \cdots + k_n y_c\\
& = X + 0\\
& = X
\end{align}$$
Thus, $y = y_p + y_c$ is also a solution of $(1)$. As $y_c$ is the general solution of $(2)$, it contains $n$ arbitrary constants, and therefore, so does $y$. Thus, $y$ is the general solution of $(1)$.
Note: The point I wanted to get across using the first example is that evaluating an indefinite integral is nothing but a special case of solving a linear differential equation (which should come as no surprise, since the indefinite integral is introduced as the "anti-derivative"). Evaluating $\displaystyle\int f(x)\, dx$ is equivalent to solving $\dfrac{dy}{dx} = f(x)$. So the function that we write down as the anti-derivative is the "particular integral" and the constant of integration is the "arbitrary constant" of the solution.
