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: 
1. First you should compute $y'$ and plug it in.
2. Since the general solution is $y = x^3 + c x^{-3}$, consider two solutions $y\_1 = x^3 + c\_1 x^{-3}$ and $y\_2 = x^3 + c\_2 x^{-3}$. Linearity tells you that $y\_1 - y\_2 = (c\_1 - c\_2) x^{-3}$ is a solution to the corresponding *homogeneous problem*. This should allow you to find $a(x)$.
3. Using the knowledge from $a(x)$ you can then find the inhomogeneous term $g(x)$ using the general form of the solution.
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
$$