If I have solution basis , how can I find out if there is a real constant coefficient homogeneous linear ODE to that solution or not?
For example, I have the solution basis $e^x, xe^x, x^2e^x,\cos(x), \sin(x)$.
I know this site is not for homework, but I can't figure it out from the book I have.
For each one, you have to find a constant-coefficient differential operator that eliminates it, and then you can stack them together (i.e. compose them), because if the coefficients are constant, the operators commute. For example, $\cos{x}$ and $\sin{x}$ are annihilated by $(d/dx)^2+1$. The other three can be eliminated by the same operator, $(d/dx-1)^3$: $$ \left(\frac{d}{dx}-1\right) x^2e^x = 2xe^x + x^2e^x-x^2e^x = 2xe^x, \\ \left(\frac{d}{dx}-1\right) xe^x = e^x + xe^x-xe^x = e^x \\ \left(\frac{d}{dx}-1\right) e^x = e^x-e^x = 0 $$ Hence all five are eliminated by $ \left(\frac{d}{dx}-1\right)^3 \left( \frac{d^2}{dx^2}+1 \right) $, and you can find the actual form of the differential equation by applying this to a function $y$ and expanding out.