I have an ODE of the form $x''=q(t)x$ and need to determine if there exists any continuous $q(t)$ so that $x_1=t\cos(t)$ and $x_2=t\sin(t)$ are linear independednt solutions of this ODE in $(-\pi,\pi)$.
My attempt : I calculated $x_1''(t) = -2\sin(t) - t\cos(t)$ and $x_2''(t) = 2\cos(t) - t\sin(t)$, so once $q(t) = \frac{-2\sin(t) - t\cos(t)}{t\cos(t)}$ and in the second case $q(t) = \frac{2\cos(t) - t\sin(t)}{t\sin(t)}$. I don't see how this two can be the same, so my answer would be no. I wanted to check with you if that's correct.
Also what got me confused is that i read that linear combinations of solutions of ODE-s are also solutions, and I have proved that $x_1=\cos(t)$ and $x_2=\sin(t)$ are actually solutions of our ODE, so I don't know if that implies anything for our new possible solutions now.
Would be glad for some help.
$$ x_1( \pi/2) = 0 \, , \, x_1''(\pi/2) \ne 0 $$ shows that $x_1$ is not the solution of an ODE $x''=q(t)x$ with a continuous function $q$ on $(-\pi, \pi)$.
A similar argument shows that $x_2$ is also not the solution of such an ODE.
If you restrict the domain to an interval where neither $x_1$ nor $x_2$ have zeros, for example $I= (0, \pi/2)$ then your approach still works and shows that $x_1$ and $x_2$ are not both solutions on $I$: $$ q(t) = \frac{-2\sin(t) - t\cos(t)}{t\cos(t)} = \frac{2\cos(t) - t\sin(t)}{t\sin(t)} $$ leads to $- \sin^2(t) = \cos^2(t)$ or $-\sin^2(t) = 1-\sin^2(t)$, which is impossible.
Alternatively: If two function $x_1$, $x_2$ are solutions of the same ODE $x'' = q(t) x$ on $I$ then $$ x_1'' x_2 - x_1 x_2'' = 0 $$ on $I$, and if $x_2 \ne 0$ then $$ x_2(t)^2 \frac{d}{dt}\left( \frac{x_1(t)}{x_2(t)} \right) = \text{const} $$ But in our case is $$ x_2(t)^2 \frac{d}{dt}\left( \frac{x_1(t)}{x_2(t)} \right) = t^2 \sin^2(t) \frac{d}{dt}\cot(t) = -t^2 \, . $$