\(\)For a linear nonhomogeneous differential equation with constant coefficients \(a_1\ldots a_n\) in the form
the solution is the superposition of the natural response and the forced response of the system. In math speak, these are called the homogeneous solution \(f_h(t)\) and the particular solution \(f_p(t)\)
To solve the linear nonhomogeneous differential equation, we
 set the force \(g(t)=0\) and solve the natural response \(f_h(t)\),
 set the initial conditions \(f(0)=f^\prime(0)=f^{\prime\prime}(0)=\ldots=0\) and solve the forced response \(f_p(t)\),
 sum the forced response to the natural response to get the total response,
 use the initial conditions to resolve any constants.
Natural (homogeneous solution)
The natural response, \(f_h(t)\), is the behavior of a circuit due to initial conditions, but without input force. We suppress the input force \(g(t)=0\) and solve just the circuit itself. This makes the nonhomogeneous differential equation \(\eqref{eq:bDV}\) into a homogeneous differential equation.
Leonhard Euler, in E10 (1728) and E62 (1739), realized that general homogeneous solutions have the form
where \(p\in \mathbb{C}\). Substituting \(f_h(t)=\mathrm{e}^{pt}\) in homogeneous differential equation \(\eqref{eq:bDVh}\) gives the socalled characteristic equation
Substituting any of the roots of the polynomial \(p_1,p_2,\ldots p_n\) in \(\mathrm{e}^{pt}\) results in a solution base \(f_i(t)=\mathrm{e}^{p_it}\).
Given that homogeneous linear differential equations obey the superposition principle, any linear combination of these functions also satisfies the differential equation. Therefore, combining the \(n\) linear independent solutions \(f_1(t), f_2(t),\ldots,f_n(t)\), leads to the homogeneous solution with real arbitrary constants \(c_1,c_2,\ldots,c_n\)
Notes:
 For double roots, or in general when a root \(p_i\) has multiplicity \(m\), the solution base is \(f(t)=t^{k1}\,\mathrm{e}^{p_it}\) where \(k\in {0,1,\ldots,m1}\).

If the differential equation \(\eqref{eq:bDV}\) has real coefficients \(a_i\), complex solutions for \(p\) will only occur in complex conjugate pairs. The realvalued solutions are obtained by replacing each pair with their realvalued linear combinations \(\Re(f_1)\) and \(\Im(f_2)\), as in
$$ \begin{align} \Re(f_1)=\frac{f_1+f_2}{2}\\ \Im(f_1)=\frac{f_1f_2}{2j} \end{align} $$Applying Euler’s trigonometry identities, these will solutions will turn into \(\cos\) and \(\sin\) terms.
The example below shows how an homogeneous linear differential equation is solved.
Example
Assume an homogeneous linear differential equation
The characteristic equation and its factorized form follow as
the solution basis becomes
Using Euler’s trigonometry identities
simplifies the solution basis to
The homogeneous solution follows as a linear combination
Forced (particular solution)
The forced response \(f_p(t)\), is the part of the response caused directly by the input force assuming all initial conditions are zero.
The solution for the forced response is usually a scaled version of the input. In the examples below we will show two methods of finding the particular solution. As you will learn the using a complex forcing function is the easiest way of obtaining the particular solution. In all other cases, we find \(f_p(t)\) by either the method of undetermined coefficients or the variation of parameters method. [link]
The particular solution is typically found using trigonometry identities, as shown in the examples in RC Lowpass Filter Appendix B, and RC Lowpass Filter Appendix B. Even for these linear first order linear systems this is a fairly painstaking process. Here we explain a less involved method to find the response to a sinusoid forcing function.
Complex superposition
The superposition property:When two signals are added together and forced on a linear system, the system response is the same as if one had forced each signal through the system separately and then added the responses.
The linearity of the system implies that if we use an input of the form \(=\hat{u}\cos(\omega t)\) then the output will have the same frequency but with a different phase and amplitude. As shown in the table below, if we scale the input by a factor \(k\) then the output will scaled by the same factor. This applies even when that factor is the imaginary number \(j\).
input  output  

$$\hat{u}\cos(\omega t+\theta)\nonumber$$  $$\longrightarrow\nonumber$$  $$A\hat{u}\cos(\omega t+\phi)\nonumber$$ 
$$\color{olive}{k}\hat{u}\cos(\omega t+\theta)\nonumber$$  $$\longrightarrow\nonumber$$  $$\color{olive}{k}A\hat{u}\cos(\omega t+\phi)\nonumber$$ 
$$\color{blue}{j}\hat{u}\cos(\omega t+\theta)\nonumber$$  $$\longrightarrow\nonumber$$  $$\color{blue}{j}A\hat{u}\cos(\omega t+\phi)\nonumber$$ 
By the superposition principle of linear systems, a forcing function of a summed \(\cos\) and \(j\sin\), will produce a scaled response of \(\cos\) and \(j\sin\)
By applying Euler’s formula
$$ \mathrm{e}^{j\varphi}=\cos\varphi+j\sin\varphi\nonumber $$
the complex input \(\underline{u}(t)\) and output \(\underline{f}(t)\) can be expressed as
Even if the forcing function is only the realpart of \(\underline{u}\), to derive the system response we may assume that it is the mathematically more convenient \(\underline{u}(t)\) even though that also includes an imaginary part, for as long as we ignore the imaginary part of the response.
In other words: if the forcing function is a \(\hat{u}\cos(\omega t)\), we may pretend that the forcing function is \(\underline{u}(t)=\hat{u}\cos(\omega t)+\color{green}{j}\,\hat{u}\sin(\omega t)=\hat{u}\,\mathrm{e}^{j\omega t}\), derive the response and then consider only the real part of the complex solution.