Q:

Uniqueness of differential equation solutions

I need to solve this DE $$y'' - 2x^{-1}y' + 2x^{-2}y = x \sin x \tag{*}$$
I found the complementary functions to be $x^2$ and $x$, and also noticed by guessing that the particular integral is $y = - x \sin x$ so the general solution is
$$y = Ax + Bx^2 + -x \sin x$$
But how do I know this is the most general form of the solution? (I'm only told that it is). How do I know there aren't any other functions that satisfy $(*)$?
Also why does the solution of an $n$th order homogeneous differential equation always have exactly $n$ arbitrary constants?

A:

$$(\ast)\iff\left(\frac{y}x\right)''=\sin x=\left(-\sin x\right)''\quad (x\ne0)$$

