Example 5 Solve\[ y^{\prime }=x\left ( 1+\frac {2y}{x}+\frac {y^{2}}{x^{4}}\right ) \] The first step is to identify if this is class G and find \(F\). We start by multiplying the RHS by \(\frac {x}{y}\) (regardless of what is in the RHS) which gives\begin {align*} y^{\prime } & =\frac {x}{y}\left ( x\left ( 1+\frac {2y}{x}+\frac {y^{2}}{x^{4}}\right ) \right ) \\ & =\frac {x^{2}}{y}+2x+\frac {y}{x^{2}}\\ & =\frac {\left ( x^{2}+y\right ) ^{2}}{x^{2}y}\\ & =F\left ( x,y\right ) \end {align*}

Next we check if \(F\left ( x,y\right ) \) has \(y\) or not in it. If so, then let the RHS above be \(F\left ( x,y\right ) \) and now do\begin {align*} f_{x} & =x\frac {\partial F}{\partial x}\\ & =\frac {2x^{4}-2y^{2}}{x^{2}y} \end {align*}

And let \begin {align*} f_{y} & =y\frac {\partial F}{\partial y}\\ & =\frac {-x^{4}+y^{2}}{x^{2}y} \end {align*}

Now we check, if \(f_{y}=0\) then this is not Homogeneous type G. Else we now need to determine value of \(\alpha \). This is done as follows. \begin {align*} \alpha & =\frac {fx}{f_{y}}\\ & =-2 \end {align*}

If \(\alpha \) comes out not to have in it \(x\) nor \(y\) as in this case, then we are done. This ode is Homogeneous type G and the ode can be written as\[ y^{\prime }=\frac {y}{x}F\left ( \frac {y}{x^{\alpha }}\right ) \] Hence the solution is\begin {equation} \ln x-c_{1}+\int ^{yx^{\alpha }}\frac {1}{\tau \left ( -\alpha -F\left ( \tau \right ) \right ) }d\tau =0 \tag {1} \end {equation} Now let \(y=\frac {\tau }{x^{\alpha }}\) and substitute this into \(F\left ( x,y\right ) \) which results in \begin {align*} F\left ( \tau \right ) & =\frac {\left ( x^{2}+y\right ) ^{2}}{x^{2}y}\\ & =\frac {\left ( x^{2}+\frac {\tau }{x^{\alpha }}\right ) ^{2}}{x^{2}\frac {\tau }{x^{\alpha }}}\\ & =\frac {\left ( x^{2}+\frac {\tau }{x^{-2}}\right ) ^{2}}{x^{2}\frac {\tau }{x^{-2}}}\\ & =\frac {\left ( x^{2}+\tau x^{2}\right ) ^{2}}{x^{4}\tau }\\ & =\frac {x^{4}+\tau ^{2}x^{4}+2\tau x^{4}}{x^{4}\tau }\\ & =\frac {1+\tau ^{2}+2\tau }{\tau } \end {align*}

The solution(1) becomes\begin {align*} \ln x-c_{1}+\int ^{yx^{\alpha }}\frac {1}{\tau \left ( -\alpha -F\left ( \alpha \right ) \right ) }d\tau & =0\\ \ln x-c_{1}+\int ^{\frac {y}{x^{2}}}\frac {1}{\tau \left ( 2-\left ( \frac {1+\tau ^{2}+2\tau }{\tau }\right ) \right ) }d\tau & =0\\ \ln x-c_{1}+\int ^{\frac {y}{x^{2}}}-\frac {1}{\tau ^{2}+1}d\tau & =0\\ \ln x-c_{1}-\int ^{\frac {y}{x^{2}}}\frac {1}{\tau ^{2}+1}d\tau & =0 \end {align*}

Solving the integral gives\begin {align*} \ln x-c_{1}-\arctan \left ( \frac {y}{x^{2}}\right ) & =0\\ y & =-\tan \left ( c_{1}-\ln x\right ) x^{2} \end {align*}