2.2.22.14 Example \(y^{\prime }=xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\)

Solve\begin {align} y^{\prime } & =xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\tag {1}\\ y^{\prime } & =\omega \left ( x,y\right ) \nonumber \end {align}

For \(x\neq 0\).  Given dilation transformation \begin {align} \bar {x} & =e^{\epsilon }x\tag {2}\\ \bar {y} & =e^{-2\epsilon }y\nonumber \end {align}

Hence\begin {align*} \xi \left ( x,y\right ) & =\left . \frac {d\bar {x}}{d\epsilon }\right \vert _{\epsilon =0}=x\\ \eta \left ( x,y\right ) & =\left . \frac {d\bar {y}}{d\epsilon }\right \vert _{\epsilon =0}=-2y \end {align*}

(At end shows how to obtain these). The integrating factor is therefore \begin {align*} \mu \left ( x,y\right ) & =\frac {1}{\eta -\xi \omega }\\ & =\frac {1}{-2y-x\left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) }\\ & =-\frac {x^{2}}{x^{4}y^{2}-1} \end {align*}

Now\begin {align} \bar {x} & =x+\xi \epsilon =x+\epsilon x\tag {3}\\ \bar {y} & =y+\eta \epsilon =y-2y\epsilon \nonumber \end {align}

This transformation \(\bar {x}=e^{\epsilon }x,\bar {y}=e^{-2\epsilon }y\) is now verified that it keeps the ode invariant. \[ \frac {d\bar {y}}{d\bar {x}}=\frac {\bar {y}_{x}+\bar {y}_{y}\frac {dy}{dx}}{\bar {x}_{x}+\bar {x}_{y}\frac {dy}{dx}}=\frac {e^{-2\epsilon }\frac {dy}{dx}}{e^{\epsilon }}=e^{-3\epsilon }\frac {dy}{dx}\] Substituting \(\bar {x},\bar {y},\frac {d\bar {y}}{d\bar {x}}\) in the original ode gives\begin {align*} \frac {d\bar {y}}{d\bar {x}} & =\bar {x}\bar {y}^{2}-\frac {2\bar {y}}{\bar {x}}-\frac {1}{\bar {x}^{3}}\\ e^{-3\epsilon }\frac {dy}{dx} & =\left ( e^{\epsilon }x\right ) \left ( e^{-2\epsilon }y\right ) ^{2}-\frac {2\left ( e^{-2\epsilon }y\right ) }{\left ( e^{\epsilon }x\right ) }-\frac {1}{\left ( e^{\epsilon }x\right ) ^{3}}\\ e^{-3\epsilon }\frac {dy}{dx} & =e^{-3\epsilon }xy^{2}-\frac {2e^{-3\epsilon }y}{x}-\frac {e^{-3\epsilon }}{x^{3}}\\ \frac {dy}{dx} & =xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}} \end {align*}

Which is the original ode. Hence the transformation (2) is invariant. It is important to use (2) and not (3) when doing the verification.

The next step is to determine what is called the canonical coordinates \(R,S\). Where \(R\) is the independent variable and \(S\) is the dependent variable. So we are looking for \(S\left ( R\right ) \) function. This is done by using the standard characteristic equation by writing\begin {align} \frac {dx}{\xi } & =\frac {dy}{\eta }=dS\nonumber \\ \frac {dx}{x} & =\frac {dy}{-2y}=dS \tag {1} \end {align}

The above comes from the requirements that \(\left ( \xi \frac {\partial }{\partial x}+\eta \frac {\partial }{\partial y}\right ) S\left ( x,y\right ) =1\). Which is a first order PDE.  This is solved for \(S\), which gives (1) using the method of characteristic to solve first order PDE which is standard method. Starting with the first pair of ODE gives\[ \frac {dy}{dx}=-\frac {2y}{x}\] Integrating gives \(yx^{2}=c\) where \(c\) is constant of integration. In this method \(R\) is always \(c\). Hence\[ R=yx^{2}\] \(S\left ( x,y\right ) \) is now found from the first equation in (1) and the last equation which gives\begin {align*} dS & =\frac {dx}{\xi }\\ S & =\int \frac {dx}{x}\\ S & =\ln x \end {align*}

Now that \(R\left ( x,y\right ) ,S\left ( x,y\right ) \) are found, the ODE \(\frac {dS}{dR}=\Omega \left ( R\right ) \) is setup. The ODE comes out to be function of \(R\) only, so it is quadrature. This is the main idea of this method. By solving for \(R\) we go back to \(x,y\) and solve for \(y\left ( x\right ) \). How to find \(\frac {dS}{dR}\)? There is an equation to determine this given by\begin {align*} \frac {dS}{dR} & =\frac {\frac {dS}{dx}+\omega \left ( x,y\right ) \frac {dS}{dy}}{\frac {dR}{dx}+\omega \left ( x,y\right ) \frac {dR}{dy}}\\ & =\frac {S_{x}+\omega \left ( x,y\right ) S_{y}}{R_{x}+\omega \left ( x,y\right ) R_{y}} \end {align*}

Everything on the RHS is known. But \begin {align*} S_{x} & =\frac {1}{x}\\ S_{y} & =0\\ R_{x} & =2yx\\ R_{y} & =x^{2} \end {align*}

Substituting gives\begin {align*} \frac {dS}{dR} & =\frac {\frac {1}{x}+\left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) \left ( 0\right ) }{2xy+\left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) x^{2}}\\ & =\frac {\frac {1}{x}}{2xy+\left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) x^{2}}\\ & =\frac {1}{x^{4}y^{2}-1} \end {align*}

But \(R=\) \(yx^{2}\), hence the above becomes\[ \frac {dS}{dR}=\frac {1}{R^{2}-1}\] This is just quadrature. Integrating gives \[ S=-\operatorname {arctanh}\left ( R\right ) +c_{1}\] This solution is converted back to \(x,y\). Since \(S=\ln x,R=yx^{2}\), the above becomes\[ \ln \left \vert x\right \vert =-\operatorname {arctanh}\left ( yx^{2}\right ) +c_{1}\] Or\begin {align*} -\ln \left \vert x\right \vert +c_{1} & =\operatorname {arctanh}\left ( yx^{2}\right ) \\ yx^{2} & =\tanh \left ( -\ln \left \vert x\right \vert +c_{1}\right ) \\ y & =\frac {\tanh \left ( -\ln \left \vert x\right \vert +c_{1}\right ) }{x^{2}} \end {align*}

Which is the solution to the original ODE.

The above shows the basic steps in this method. Let us solve more ODE’s to practice this method more.

Finding Lie symmetries for this example

The condition of symmetry is given above in equation (14) as\begin {equation} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0 \tag {14} \end {equation} We now need to solve the above for \(\xi ,\eta \,\) given a specific \(\omega \left ( x,y\right ) \) for the ODE at hand. This PDE can not be solved as is for \(\xi ,\eta \) without an ansatz. One common ansatz is to use \(\xi =\alpha \left ( x\right ) \) and \(\eta =\beta \left ( x\right ) y+\gamma \left ( x\right ) \) and plugging these into the above and then compare coefficients to solve for \(\alpha \left ( x\right ) ,\beta \left ( x\right ) ,\gamma \left ( x\right ) \).

Another ansatz is to use a polynomials for \(\xi ,\eta \). And this is what we will start with.

Using polynomial as ansatz

We start with order \(1\) polynomials. Hence\begin {align} \xi & =a_{0}+a_{1}x\tag {1}\\ \eta & =b_{0}+b_{1}y \tag {2} \end {align}

If this does not generate solution, we will try higher order polynomials. Eq (14) becomes\begin {align*} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta & =0\\ 0+\omega \left ( b_{1}-a_{1}\right ) -\omega ^{2}\left ( 0\right ) -\omega _{x}\left ( a_{0}+a_{1}x\right ) -\omega _{y}\left ( b_{0}+b_{1}y\right ) & =0 \end {align*}

But in this ODE \(\omega =xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\), hence \(\omega _{x}=y^{2}+\frac {2y}{x^{2}}+\frac {3}{x^{4}}\) and \(\omega _{y}=2yx-\frac {2}{x}\). The above becomes\begin {align*} \left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) \left ( b_{1}-a_{1}\right ) -\left ( y^{2}+\frac {2y}{x^{2}}+\frac {3}{x^{4}}\right ) \left ( a_{0}+a_{1}x\right ) -\left ( 2yx-\frac {2}{x}\right ) \left ( b_{0}+b_{1}y\right ) & =0\\ xy^{2}b_{1}-\frac {2y}{x}b_{1}-\frac {1}{x^{3}}b_{1}-xy^{2}a_{1}+\frac {2y}{x}a_{1}+\frac {1}{x^{3}}a_{1}-y^{2}a_{0}-\frac {2y}{x^{2}}a_{0}-\frac {3}{x^{4}}a_{0}-xy^{2}a_{1}-a_{1}\frac {2y}{x}-a_{1}\frac {3}{x^{3}}-2yxb_{0}+\frac {2}{x}b_{0}-2y^{2}xb_{1}+\frac {2y}{x}b_{1} & =0\\ xy^{2}\left ( b_{1}-a_{1}-a_{1}-2b_{1}\right ) +\frac {y}{x}\left ( -2b_{1}+2a_{1}-2a_{1}+2b_{1}\right ) +\frac {1}{x^{3}}\left ( -b_{1}+a_{1}-3a_{1}\right ) +y^{2}\left ( -a_{0}\right ) +\frac {y}{x^{2}}\left ( -2a_{0}\right ) +\frac {1}{x^{4}}\left ( -3a_{0}\right ) +yx\left ( -2b_{0}\right ) +\frac {1}{x}\left ( 2b_{0}\right ) & =0 \end {align*}

Each coefficient to each monomial must be zero. Hence\begin {align*} -2a_{1}-b_{1} & =0\\ -b_{1}-2a_{1} & =0\\ -2a_{1}-2b_{1} & =0\\ a_{0} & =0\\ b_{0} & =0 \end {align*}

These are overdetermined equations. Solving gives \(a_{1}=-\frac {1}{2}b_{1}\) and \(a_{0}=b_{0}=0\). Choosing \(b_{1}=-2\) gives \(a_{1}=1\). Hence\begin {align*} \xi & =a_{0}+a_{1}x=x\\ \eta & =b_{0}+b_{1}y=-2y \end {align*}

Which is what we wanted to show for this ODE. These are the values we used earlier to solve the ODE using symmetry method.

Using functions as ansatz

Now \(\xi ,\eta \) are found using \(\xi =\alpha \left ( x\right ) \) and \(\eta =\beta \left ( x\right ) y+\gamma \left ( x\right ) \) as ansatz. Eq. (14) is\begin {equation} \eta _{x}+\omega \left ( \eta _{y}-\xi _{x}\right ) -\omega ^{2}\xi _{y}-\omega _{x}\xi -\omega _{y}\eta =0 \tag {14} \end {equation} But \[ \eta _{x}=\beta ^{\prime }\left ( x\right ) y+\gamma ^{\prime }\left ( x\right ) \] And\[ \eta _{y}=\beta \left ( x\right ) \] And\begin {align*} \xi _{y} & =0\\ \xi _{x} & =\alpha ^{\prime }\left ( x\right ) \end {align*}

Substituting the above into EQ. (14) gives\[ \beta ^{\prime }\left ( x\right ) y+\gamma ^{\prime }\left ( x\right ) +\omega \left ( \beta \left ( x\right ) -\alpha ^{\prime }\left ( x\right ) \right ) -\omega _{x}\alpha \left ( x\right ) -\omega _{y}\left ( \beta \left ( x\right ) y+\gamma \left ( x\right ) \right ) =0 \] But in this ODE \(\omega =xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\), hence \(\omega _{x}=y^{2}+\frac {2y}{x^{2}}+\frac {3}{x^{4}}\) and \(\omega _{y}=2yx-\frac {2}{x}\). The above becomes\[ \beta ^{\prime }y+\gamma ^{\prime }+\left ( xy^{2}-\frac {2y}{x}-\frac {1}{x^{3}}\right ) \left ( \beta -\alpha ^{\prime }\right ) -\left ( y^{2}+\frac {2y}{x^{2}}+\frac {3}{x^{4}}\right ) \alpha -\left ( 2yx-\frac {2}{x}\right ) \left ( \beta y+\gamma \right ) =0 \] Or\[ \gamma ^{\prime }+y\beta ^{\prime }+\frac {2}{x}\gamma -\frac {1}{x^{3}}\beta -\frac {3}{x^{4}}\alpha -y^{2}\alpha +\frac {1}{x^{3}}\alpha ^{\prime }-2xy\gamma -\frac {2}{x^{2}}y\alpha -xy^{2}\beta +\frac {2}{x}y\alpha ^{\prime }-xy^{2}\alpha ^{\prime }=0 \] Collecting on \(y\) gives\[ y^{0}\left ( \gamma ^{\prime }+\frac {2}{x}\gamma -\frac {1}{x^{3}}\beta -\frac {3}{x^{4}}\alpha +\frac {1}{x^{3}}\alpha ^{\prime }\right ) +y\left ( \beta ^{\prime }-2xy\gamma -\frac {2}{x^{2}}\alpha +\frac {2}{x}\alpha ^{\prime }\right ) +y^{2}\left ( -\alpha -x\beta -x\alpha ^{\prime }\right ) =0 \] Each term above is zero. This gives the following equations\begin {align*} \gamma ^{\prime }\left ( x\right ) +\frac {2}{x}\gamma \left ( x\right ) -\frac {1}{x^{3}}\beta \left ( x\right ) -\frac {3}{x^{4}}\alpha \left ( x\right ) +\frac {1}{x^{3}}\alpha ^{\prime }\left ( x\right ) & =0\\ \beta ^{\prime }\left ( x\right ) -2xy\gamma \left ( x\right ) -\frac {2}{x^{2}}\alpha \left ( x\right ) +\frac {2}{x}\alpha ^{\prime }\left ( x\right ) & =0\\ -\alpha \left ( x\right ) -x\beta \left ( x\right ) -x\alpha ^{\prime }\left ( x\right ) & =0 \end {align*}

Solving these coupled ODE on the computer gives\begin {align*} \alpha \left ( x\right ) & =\frac {1}{x}\left ( c_{3}x^{4}+c_{1}x^{2}+c_{2}\right ) \\ \beta \left ( x\right ) & =-4c_{3}x^{2}-2c_{1}\\ \gamma \left ( x\right ) & =-2c_{3}-2\frac {c_{2}}{x^{4}} \end {align*}

Where the \(c_{1},c_{2},c_{3}\) above are constant of integration. Let \(c_{2}=c_{3}=0\). Hence\begin {align*} \alpha \left ( x\right ) & =\frac {1}{x}\left ( c_{3}x^{4}+c_{1}x^{2}\right ) \\ \beta \left ( x\right ) & =-4c_{3}x^{2}-2c_{1}\\ \gamma \left ( x\right ) & =0 \end {align*}

Let \(c_{3}=0\). Hence\begin {align*} \alpha \left ( x\right ) & =\frac {1}{x}c_{1}x^{2}\\ \beta \left ( x\right ) & =-2c_{1}\\ \gamma \left ( x\right ) & =0 \end {align*}

Let \(c_{1}=1\), hence\begin {align*} \alpha \left ( x\right ) & =x\\ \beta \left ( x\right ) & =-2\\ \gamma \left ( x\right ) & =0 \end {align*}

Therefore, since \(\xi =\alpha \left ( x\right ) \) and \(\eta =\beta \left ( x\right ) y+\gamma \left ( x\right ) \) then \(\xi =x,\eta =-2y\) which is the same as the earlier method. After working using this ansatz, I find using the polynomial ansatz better. First of all, I had to set constants above to values in order to obtain the same result as earlier. Setting these constants other values will give different result.  For example, the following are another set of possible solutions obtained from Maple for this ODE\begin {align*} & \left \{ \alpha \left ( x\right ) =\frac {1}{x},\beta \left ( x\right ) =0,\gamma \left ( x\right ) =-\frac {2}{x^{4}}\right \} \\ & \left \{ \alpha \left ( x\right ) =-\frac {x}{2},\beta \left ( x\right ) =1,\gamma \left ( x\right ) =0\right \} \\ & \left \{ \alpha \left ( x\right ) =-\frac {x^{3}}{4},\beta \left ( x\right ) =x^{2},\gamma \left ( x\right ) =\frac {1}{2}\right \} \end {align*}

Which gives\begin {align*} & \left \{ \xi =\frac {1}{x},\eta =-\frac {2}{x^{4}}\right \} \\ & \left \{ \xi =-\frac {x}{2},\eta =y\right \} \\ & \left \{ \xi =\frac {-x^{3}}{4},\eta =x^{2}y+\frac {1}{2}\right \} \end {align*}