Consider the linear system
$$\dot{\mathbf{Y}} + M\mathbf{Y} = \mathbf{v}e^{-\lambda t}$$
I want to know how I can find the particular integral of this system of differential equations when $\lambda$ is an eigenvalue of $M$.
Usually, in the system above we would be able to guess the particular integral is of the form $\mathbf{Y} = \mathbf{u}e^{-\lambda t}$ and get
$$(M-\lambda I)\mathbf{u}e^{-\lambda t} = \mathbf{v}e^{-\lambda t}\text{.}$$
Thus we can solve for $\mathbf{u}$ as follows: $$\mathbf{u} = (M-\lambda I)^{-1}\mathbf{v}\text{.}$$
This won't work, however, when $\lambda$ is an eigenvalue of $M$ since $(M-\lambda I)$ has zero determinant and thus not invertible in this case. What can I do to find the particular integral in this case?
(Assuming $\lambda$ is of multiplicity $1$) I would have thought that $\mathbf{Y} = (\mathbf{a} + \mathbf{b}t)e^{-\lambda t}$ would work as a particular integral. However, I am finding this to not be helpful - putting this into the above equation yields
$$\mathbf{b}-\lambda (\mathbf{a} + \mathbf{b}t) + M(\mathbf{a} + \mathbf{b}t) = \mathbf{v}$$
which once again causes $M-\lambda I$ to appear with the factor of $(\mathbf{a} + \mathbf{b}t)$. In particular, since there is no term linear in $t$ on the right hand side (all these vectors are constant vectors) I would want to ensure that the terms linear in t on the left equate to 0, that is
$$(M-\lambda I)\mathbf{b}t = 0\text{.}$$
So,
$$\mathbf{b}+(M-\lambda I)\mathbf{a}= \mathbf{v}$$
I'm not sure how to proceed from here, or if there is a more appropriate form for the particular integral.
I will consider the case in which $M$ is diagonalizable (I'll let you ponder over the cases for different (algebraic vs geometric) multiplicity of $\lambda$), which probably gives you an idea of how to start to generalize to different multiplicities.
If $M$ is diagonalizable, there exists an invertible $P$ and a diagonal matrix $D$ such that $M = PDP^{-1}$. Now, use the substitution $Y = PX$ to obtain $$P\dot{\mathbf{X}} + M P \mathbf{X} = \mathbf{v}e^{-\lambda t} $$ so we have $$\dot{\mathbf{X}} + \text{diag}(\lambda_1,...,\lambda_n) \mathbf{X} = (P^{-1}\mathbf{v})e^{-\lambda t}. $$
For notational convenience, we set $\mathbf{w} = P^{-1}\mathbf{v}$, and this reduces to $$\dot{\mathbf{X}} + \text{diag}(\lambda_1,...,\lambda_n) \mathbf{X} = \mathbf{w}e^{-\lambda t}. $$
Note that the $\lambda_i$ can be repeated (ie takes the same value for different values of $i$). Without loss of generality, we suppose that $\lambda_1 = \lambda_2 = \cdots = \lambda_k = \lambda$ (on the right hand side) for some $k \leq n$ (ie $\lambda$ appears $k$ times in the diagonal matrix $D$). Now, we are in good shape to view the ODE system as a system of $n$ ODEs! Thus, we have
$$x_i' + \lambda_i x_i = w_i e^{-\lambda t} $$ for $i = 1,...,n$. (Here, I use $'$ for differentiation with respect to $t$.)
For $1 \leq i \leq k$ (ie $\lambda_i = \lambda$), we have that $$x_i' + \lambda x_i = w_i e^{-\lambda t}. $$ Using an integrating factor, we have $$\begin{aligned} (x_i e^{\lambda t})' &= w_i \\ x_i &= (w_i) t e^{-\lambda t}. \end{aligned}$$
For $k < i \leq n$ (ie $\lambda_i \neq \lambda$), we have that $$x_i' + \lambda_i x_i = w_i e^{-\lambda t}. $$ Using an integrating factor, we have $$\begin{aligned} (x_i e^{\lambda_i t})' &= w_ie^{-(\lambda - \lambda_i) t} \\ x_i e^{\lambda_i t} &= \frac{w_i}{\lambda_i - \lambda} e^{-(\lambda - \lambda_i) t} \\ x_i &= \frac{w_i}{\lambda_i - \lambda} e^{-\lambda t} \end{aligned}.$$
This is actually pretty messy to write in a compact vectorial notation, but essentially, we have solved the ODE system (not just the particular solution, but the general solution too)!