How to determine the order of a differential equation when it's solution is given We know how to find the solution of a given Homogeneous linear equations with constant coefficients.
In assignment I have to find the minimum possible order of a Homogeneous linear equations with constant coefficients having $x^2 sin x$ as a solution. I am really blank and have no idea how to proceed. Kindly help me. Any hint or solution will be helpful to me. Thanks a lot for the help.
 A: Here is another way to look at the problem.
Take the homogeneous linear differential equation $L(y)=0$ where $L$ has degree $n$ and real coefficients. The standard test solution for this is $y=e^{ax}$ giving a polynomial equation of $P(a)=0$ degree $n$ for $a$ with the same coefficients as $L$.
If all the roots of $P$ are simple roots then $y$ is a linear combination of simple exponentials. If the roots are not real, then they come in conjugate pairs $c+di, c-di$ and combining them gives terms involving $e^{cx}\sin dx$ and $e^{cx}\cos dx$.
If there is a double root $b$, the solution may involve a term of the form $(rx+s)e^{bx}$ and for a triple root you get a quadratic coefficient.
So you need your auxiliary equation to have the right triple root, which should be enough, with some thought, to solve the problem. In fact it gives a quicker and cleaner solution than taking the derivatives and eliminating by hand, though you might want to check that the solution you get by this means does work.
A: If $f(x) = x^2\sin x$ is the solution of a linear ODE with constant coefficiencts, then for some $a_1,\ldots,a_n$ you have ($.^{(n)}$ means $n$-th derivative here) $$
  a_1\cdot f^{(1)} + \ldots + a_n f^{(n)} = f.
$$
Now in your case $f^{(1)} = x^2\cos x + 2x\sin x$. Is there an $a_1$ such that $$
  a_1 x^2\cos x + a_12x\sin x = x^2\sin x  \quad ?
$$
If not, try $n=2,3,\ldots$ until you succeed.
A: If $$y=x^2\sin x$$ you then have $$y'=x^2\cos x+2x\sin x$$$$y''=-x^2\sin x+4x\cos x+2\sin x$$
Now you see that you will be getting terms $p(x)\cos x+q(x)\sin x$ where $p(x), q(x)$ are quadratic in $x$. You can see that you can use $z=y''+y$ to eliminate the term in $x^2\sin x$ (and there is no term in $x^2\cos x$*). But it is a question of how to eliminate the remaining terms. You need more derivatives.
*It is useful to note that $y$ and $z$ are odd functions of $x$, so first derivatives won't help, because the first derivatives will be even functions. This simplifies the work considerably. 
A: I think we can approach this way.
Think when we have term $sin x$ in solution of D.E. Yes,when we have complex pair of roots and solution looks like $e^{\alpha x}(C_1cos(\beta x)+C_2sin(\beta x))$.And,in this case order of D.E.is $2$.But we want $x^2 sinx$ to be present.
Now,suppose we have repeated pair of complex root.This means our solution will look like$e^{\alpha x}((C_1 + C_2 x)cos(\beta x)+(C_3 + C_4 x)sin(\beta x))$.Look we got term which looks like $xsinx$ in our solution. In this case since there are four constants order is $4$.
Now,suppose we have complex root repeated thrice.Then,our solution will look like$e^{\alpha x}((C_1 + C_2 x +C_3 x^2)cos(\beta x)+(C_4 + C_5 x + C_6 x^2)sin(\beta x))$.Yeah,we got term $x^2sinx$ in solution.
And since there are $6$ constants present,answer is $\color\red 6$.
