The subject are LDE's with constant coefficients of the following form:

\sum_{i=0}^{N} a _{i}y ^{\left(i\right)} = e^{kx}\left( W_{m}\left(x\right)\sin \left(kx\right)+ V_{n}\left(x\right)\cos \left(kx\right)\right),

W_{m} and V_{n} being polynomials of given degrees.

1) I choose the max\{m,n\}, let it be n.
2) I write down the following functions:

\varphi_{n}\left(x\right) = x ^{n}e ^{kx}\sin \left(\beta x\right)\\
 \phi_{n}\left(x\right)=x^{n}e^{kx}\cos \left(\beta x\right)

every such function satisfies the conditions below:

\varphi_{n}'=k\varphi_{n}+\beta \phi_{n}+n\varphi_{n-1}
\phi_{n}'=k\phi_{n}-\beta \varphi_{n}+n\phi_{n-1}

3) I put down both the source term and the solution function using a base \mathbb{B}=\left[\varphi_{n} \ \phi_{n} \ \varphi_{n-1} \ \phi_{n-1} \ ... \ \varphi_{0} \ \phi_{0}]^{T}, so that the right side of the equation becomes C\mathbb B, and the solution becomes A\mathbb B.

4) I make two additional matrices:

\mathbb{R}^{2}_{2} \ni G:= \begin{bmatrix} k&\beta\\-\beta &k\end{bmatrix}

\mathbb{R}^{2n+2}_{2n+2} \ni S:= \begin{bmatrix} G&nI&0&...&0&0&0\\0&G&(n-1)I&...&0&0&0\\0&0&G&...&0&0&0\\...&...&...&...&..  .&...&...\\0&0&0&...&G&2I&0\\0&0&0&...&0&G&I\\0&0&  0&...&0&0&G \end{bmatrix},

therefore

y^{(n)}=AS^{n}\mathbb B.

5) Finally I rewrite the initial equation:

\sum_{i=0}^{N} a _{i}y ^{(i)} = a _{N}AS^{N}\mathbb{B} + a _{N-1}AS^{N-1}\mathbb{B} +...+ a _{0}A\mathbb{B} = A \left( \sum_{i=0}^{N} a_{i}S^{i} \right) \mathbb{B}= C\mathbb{B}

eventually giving A\sum_{i=0}^{N} a_{i}S^{i} = C, which can be solved for A.

Has such a method been described somewhere, or is it something new?
Thanks in advance