Question: Construct a linear first order ODE of $$xy'+a\_0(x)y=g(x)$$
such that the general solution is $$y=x^3+\frac{c}{x^3}$$

If I substitute the general solution into the question, 
$$xy'+a\_0(x)(x^3+\frac{c}{x^3})=g(x)$$
this form looks unusual to solve and a(x), g(x) are not given in any expression. how can I to approach this?

Answer: 
Isolating the constant gives
$$
C=x^3y-x^6.
$$
Differentiating to get rid of the constant results in
$$
0=x^3y'+3x^2y-6x^5
$$
The canonical first order linear equation form of that is then
$$
y'+\frac3xy=6x^2
$$
If $y = x^3 + cx^{-3}$ then
$$
 xy' = x\left(3x^2 -3cx^{-4}\right) = 3x^3 - 3cx^{-3}
$$
So
$$
 xy' + a\_0(x) y 
 = 3x^3 - 3cx^{-3}+ a\_0(x) \left(x^3 + cx^{-3}\right)
 = (a\_0(x)+3)x^3 + c(a\_0(x)-3)x^{-3}
$$
Since this is to be equal to a function $g(x)$ independent of $c$, we must have $a\_0(x)=3$. It follows that $g(x)=6x^3$ works.