# 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?

• you need a theorem about the solution set of an second order linear differential equation with non constant coefficients – Dr. Sonnhard Graubner Nov 24 '14 at 13:28
• @Dr.SonnhardGraubner Actually, no they do not need that (or only a very simple special case of it). – Did Nov 24 '14 at 19:04

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