Solving the Differential equation: $y'=\frac{2}{x}y+x^3$ We have the differential equation $$y'=\frac{2}{x}y+x^3$$ and we know $x \in (0, \infty)$.
My attempt with variation of constants
\begin{align}
\phi(x) &= \exp \left(\int \frac{2}{x} dx \right) \\
&= \exp(2\ln|x|) \\
&= x^2c
\end{align}
and 
\begin{align}
\psi(x) &= (x^2c) \cdot \int \frac{x^3}{x^2} dx \\
&= (x^2c) \cdot \frac{x^2}{2}
\end{align}
but this solution is wrong. Where is the mistake?
 A: The mistake is with the integration constant:
$$\exp\left(\int\frac{2}{x}\,dx\right) = \exp\bigr(2\log(x) + d\bigl) = cx^2$$
and not $x^2 +c$
A: If $y'-p(x)y=0$ is a homogeneous equation then its general solution is given by $y=Ce^{\int p(x)dx}.$
A: Observe that
$$\phi\left(x\right)=\exp\left(\int\frac{2}{x}{\rm d}x\right)=\exp\left(2\ln\left|x\right|+C\right)=Ax^{2}$$
with $A\equiv\exp C$. Thus the particular solution is
$$y_{\rm p}=Ax^{2}\int\frac{x^{3}}{Ax^{2}}{\rm d}x=\frac{x^{4}}{2}$$
A: $$y'=\frac { 2 }{ x } y+x^{ 3 }\\ y'-\frac { 2 }{ x } y=0\\ \frac { dy }{ dx } =\frac { 2y }{ x } \\ \int { \frac { dy }{ y }  } =2\int { \frac { dx }{ x }  } \\ \ln { y } =2\ln { x } +C\\ \ln { y } =\ln { C{ x }^{ 2 } } \\ y=C{ x }^{ 2 }\\ y=C\left( x \right) { x }^{ 2 }\\ { y }'={ C }'\left( x \right) { x }^{ 2 }+2xC\left( x \right) \\ { C }'\left( x \right) { x }^{ 2 }+2xC\left( x \right) =\frac { 2 }{ x } C{ x }^{ 2 }+{ x }^{ 3 }\\ { C }'\left( x \right) { x }^{ 2 }={ x }^{ 3 }\\ { C }'\left( x \right) ={ x }\\ C\left( x \right) =\frac { { x }^{ 2 } }{ 2 } +C\\ y={ x }^{ 2 }\left( \frac { { x }^{ 2 } }{ 2 } +C \right) \\ \\ $$
A: Multipying both side by $e^{-2\ln x}=1/x^2$ we get  $$y'=\frac{2}{x}y+x^3\Longleftrightarrow (\frac{y}{x^2})'= x\Longleftrightarrow \frac{y}{x^2}=x^2/2+c\\\Longleftrightarrow y(x)= x^4/2+cx^2$$
