second order linear homogeneous equations problem I need to find a second order linear homogeneous equation with constant coefficients that has the given function as a solution
question a) $xe^{-3x}$
question b) $e^{3x} \sin x$
We have learned about the aux equations in second order, and we have touched on the reduction of order process
Question $a)$  I see that $-3$ must be a root of the characteristic equation and because there is $a x$ in $xe^{-3x}$ it must be a repeated root, so my solution that I have is $y"-6y+9$
Question $b)$ I have got $y"-6y'+10y=0$
 A: Hints 
For the first one, $\lambda_1 = \lambda_2 = -3$ are roots of the char. polynomial, so $$\chi(\lambda) = (\lambda - (-3))^2 = \lambda^2+6\lambda+9$$
Which corresponds to the diff. eq.  $$y''+6y'+9y=0$$
Which has, as already found, the general solution $$y=c_1e^{-3x} + c_2xe^{-3x}$$
Now choose the values of $y(0)$ and $y'(0)$ in such a way that $c_1 =0$ and $c_2 = 1$. With $y(0)$ we have 
$$y(0) = c_1 $$
So we can set $y(0) = 0$ to set $c_1=0$. For $y'(0)$ we have
$$y'(x)= \frac{d}{dx}(c_2xe^{-3x}) = c_2e^{-3x} + -3xc_2e^{-3x} = c_2e^{-3x}(1-3x)$$
Then
$$y'(0) = c_2$$
So we set $y'(0) = 1$ to get when we want.
For the second, you should know that if the solution $\lambda$ to $\chi(\lambda)$ looks like $$\lambda_{i,i+1} = \alpha \pm i\beta $$
Then this produces the solution $$y=c_1e^{\alpha x}\cos(\beta x) + c_2e^{\alpha x}\sin(\beta x)$$
Again, determine what $\lambda$ has to look like when the solution has to look like $$ e^{3x}\sin(x)$$
Then deduce the characteristic polynomial from it, from which you can deduce the original differential equation. 
Start by identifying $\lambda_1 = 3 + i$, deduce the complex conjugate pair as $\lambda_2 = 3 - i$, now set $$\chi(\lambda) = (\lambda - \lambda_1)(\lambda-\lambda_2)$$
To get $$\chi(\lambda) = \lambda^2- 6\lambda+10 $$
Which corresponds to 
$$y'' - 6y' + 10y = 0$$
Which has the general solution
$$y(x) = c_1e^{3x}\cos(x) + c_2e^{3x}\sin(x)$$
Again, as above, choose $y(0)$ and $y'(0)$ in such a way that $c_1=0$ and $c_2 = 1$ to give the desired solution. 
We see that
$$y(0) = c_1$$ So we need to set $y(0)=0$.
But $y'(x) $$ is a little bit harder t ocompute, I leave that to you. 
A: Question A
Let the answer to question a be of the form
$$ay''+by'+cy=0$$
Then we want
$$a(-3)^2-3b+c=9a-3b+c=0\qquad (1)$$
And more over, since it is a repeated root we need
$$-\frac{b}{2a}=-3$$
Substituting $b=6a$ into $(1)$ we get
$$9a-18a+c=0\Rightarrow c=9a$$
Thus if we let $a$ be our free variable, all solutions to question a are of the form
$$ay''+6ay'+9ay=0$$
Question B For question b, you need the characteristic polynomial to have the roots $3\pm i$. Thus the characteristic polynomial must be of the form
$$a(x-[3+i])(x-[3-i])=ax^2-6ax+10a$$
Thus solutions to question b are of the form
$$ay''-6ay'+10ay=0$$
Note For your solution to question a you got $y''-6y'+9y=0$ but going back and checking you should get $+6y'$ not $-6y'$. Otherwise your solutions are of these forms with $a=1$, but $a$ can be any real number. It is our free variable.
