Let the function
\begin{equation*}
X(t)=a_0 + \sum_{k=1}^N a_k\cos(kwt)+b_k\sin(kwt)
\end{equation*}
be a solution of a homogeneous ODE
Question. How can I find the expression of the ODE?
Would it be possible to use the methods presented in Finding a differential equation from a known solution?
or
Finding the general solution of a sixth degree differential equation
to solve it? If yes, how?
Best Answer
Your solution can be rewritten as a sum of $N+1$ pieces
$$X(t) = X_0(t) + X_1(t) + \ldots X_N(t)$$
where $$X_0(t) = a_0,\quad X_k(t) = a_k\cos(kwt) + b_k\sin(kwt)\quad\text{ for } 1 \le k \le N.$$ Since $$ \frac{d}{dt}X_0(t) = 0 \quad\text{ AND }\quad \left(\frac{d^2}{dt^2} + k^2w^2\right)X_k(t) = 0\quad\text{ for }\quad 1 \le k \le N. $$
and the operators $\displaystyle\;\frac{d}{dx}$, $\displaystyle\;\frac{d^2}{dx^2} + k^2 w^2$ commute among themselves, $X(t)$ itself will be a solution of the ODE $$\frac{d}{dt}\left[\prod_{k=1}^N \left(\frac{d^2}{dt^2} + k^2 w^2\right)X(t)\right]= 0.$$ Please note that the operator on the LHS is simply the "product" of operators corresponds to the individual pieces.