prove that any second-order linear ODE is nonhomogeneous given $x^2 \sin(x)$ is a solution

I was given the following problem:

Let $y''+p(x)y'+q(x)y=r(x)$ be a second order differential equation, where $p(x),q(x),r(x)$ are continuous on $(-\pi,\pi)$ and suppose $u(x) = x^2\sin x$ is a solution to the equation. prove that the equation is nonhomogeneous

I tried to suppose by contradiction that $r(x)= 0$ and assume the existance of another solution, $u_2(x)$, linearly independent of $u(x)$, and show that their Wronskian has both a zero and a nonzero value in $(-\pi,\pi)$. I was able to get a zero value, at $x=0$, but couldn't find a non-zero value, because I do not know what $u_2(x)$ and $u_2'(x)$ are.

• If $y''+p(x)y'+q(x)y=0$, what solution do you get for initial values $y(0)=0=y'(0)$? – LutzL Dec 3 '16 at 17:42
• Oh I understand now, Thanks! – Bary12 Dec 3 '16 at 17:57
• @LutzL, you might want to write your comment as an answer so that this question is not unanswered. – Joel Reyes Noche Sep 7 '18 at 14:29

If $u(x)=x^2\sin x$ were the solution of a second order homogeneous ODE $$y''+p(x)y'+q(x)y=0,$$ then with the initial values $y(0)=u(0)=0$ and $y'(0)=u'(0)=0$ one would get by the uniqueness theorem only the zero solution for $y$, and not $u$.