3.4.10.3 Example \(y^{\prime }=\frac {y}{x}+x\)

This is linear first order which can be easily solved using integrating factor. But this is just to illustrate Lie symmetry method.

\begin{align} y^{\prime } & =\frac {y}{x}+x\tag {1}\\ y^{\prime } & =\omega \left ( x,y\right ) \nonumber \end{align}

The first step is to find \(\xi \) and \(\eta \). Using lookup method, since this is linear ode of form \(y^{\prime }=f\left ( x\right ) y+g\left ( x\right ) \) then

\begin{align*} \xi & =0\\ \eta & =e^{\int fdx}=e^{\int \frac {1}{x}dx}=x \end{align*}

The end of this problem shows also how to find these from the symmetry conditions. Therefore we write

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

The integrating factor is therefore

\begin{align*} \mu \left ( x,y\right ) & =\frac {1}{\eta -\xi \omega }\\ & =\frac {1}{x}\end{align*}

Before solving this, let us first verify that transformation (2) is invariant which means it leaves the ode in same form but using \(\bar {x},\bar {y}\). We do the same as in the above introduction.

\begin{align*} \frac {d\bar {y}}{d\bar {x}} & =\frac {\frac {d\bar {y}}{dx}}{\frac {d\bar {x}}{dx}}\\ & =\frac {\bar {y}_{x}+\bar {y}_{y}\frac {dy}{dx}}{\bar {x}_{x}+\bar {x}_{y}\frac {dy}{dx}}\end{align*}

But \(\bar {y}_{x}=s,\bar {y}_{y}=1,\bar {x}_{x}=1,\bar {x}_{y}=0\) and the above becomes

\begin{align*} \frac {d\bar {y}}{d\bar {x}} & =\frac {\epsilon +\frac {dy}{dx}}{1}\\ & =\epsilon +\frac {dy}{dx}\end{align*}

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}} & =\frac {\bar {y}}{\bar {x}}+\bar {x}\\ \epsilon +\frac {dy}{dx} & =\frac {y+\epsilon x}{x}+x\\ \epsilon +\frac {dy}{dx} & =\frac {y}{x}+\epsilon +x\\ \frac {dy}{dx} & =\frac {y}{x}+x \end{align*}

Which is the original ODE. Therefore (2) are indeed an invariant Lie group transformation as it leaves the ODE unchanged. 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}{0} & =\frac {dy}{x}=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.  In the special case when \(\xi =0\) and \(\eta \neq 0\) these give

\begin{align*} R & =x\\ S & =\int \frac {1}{\eta }dy\\ & =\int \frac {1}{x}dy\\ & =\frac {y}{x}+c \end{align*}

We are free to set \(c=0\), hence \(S=\frac {y}{x}\). Therefore the transformation to canonical coordinates is

\[ \left ( x,y\right ) \rightarrow \left ( R,S\right ) =\left ( x,\frac {y}{x}\right ) \]

The derivative in \(\left ( R,S\right ) \) is found same as with \(\frac {d\bar {y}}{d\bar {x}}\) giving

\[ \frac {dS}{dR}=\frac {S_{x}+S_{y}\frac {dy}{dx}}{R_{x}+R_{y}\frac {dy}{dx}}\]

But \(S_{x}=-\frac {y}{x^{2}},S_{y}=\frac {1}{x},R_{x}=1,R_{y}=0\) and the above becomes

\begin{align*} \frac {dS}{dR} & =\frac {-\frac {y}{x^{2}}+\frac {1}{x}\frac {dy}{dx}}{1}\\ & =-\frac {y}{x^{2}}+\frac {1}{x}\frac {dy}{dx}\end{align*}

But \(\frac {dy}{dx}=\frac {y}{x}+x\) hence the above becomes

\begin{align*} \frac {dS}{dR} & =-\frac {y}{x^{2}}+\frac {1}{x}\left ( \frac {y}{x}+x\right ) \\ & =1 \end{align*}

Solving this gives

\[ S=R+c_{1}\]

But \(S=\frac {y}{x},R=x\). Therefore the above becomes

\begin{align*} \frac {y}{x} & =x+c_{1}\\ y & =x^{2}+c_{1}x \end{align*}

Which is the solution to the original ode. Of course this was just an example showing how to use Lie symmetry method. The original ode is linear and can be easily solved using an integrating factor

\begin{align*} y^{\prime }-\frac {y}{x} & =x\\ I & =e^{-\int \frac {1}{x}dx}=e^{-\ln x}=\frac {1}{x}\end{align*}

Multiplying the ode by \(I\) gives

\begin{align*} \frac {d}{dx}\left ( yI\right ) & =Ix\\ \frac {y}{x} & =\int \frac {x}{x}dx\\ & =x+c_{1}\end{align*}

Hence

\[ y=x^{2}+xc_{1}\]

Which is same solution. But Lie symmetry method works the same way for any given ode. And this is where it powers are. It can solve much more complicated odes than this using the same procedure. The main difficulty is in finding the infinitesimals for the group, which are \(\xi ,\eta \) that leaves the ode invariant.

Finding Lie symmetries for this example

\begin{align*} y^{\prime } & =\frac {y}{x}+x\\ & =\omega \left ( x,y\right ) \end{align*}

The condition of symmetry is a the linearized PDE 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 first find the determining equation before solving for \(\xi ,\eta \). Since \(\omega =\frac {y}{x}+x\) then \(\omega _{y}=\frac {1}{x},\omega _{x}=-\frac {y}{x^{2}}+1\). Hence the above becomes

\begin{align*} \eta _{x}+\left ( \frac {y}{x}+x\right ) \left ( \eta _{y}-\xi _{x}\right ) -\left ( \frac {y}{x}+x\right ) ^{2}\xi _{y}-\left ( -\frac {y}{x^{2}}+1\right ) \xi -\frac {1}{x}\eta & =0\\ \eta _{x}+\left ( \frac {y}{x}+x\right ) \left ( \eta _{y}-\xi _{x}\right ) -\left ( \frac {y^{2}}{x^{2}}+x^{2}+2y\right ) \xi _{y}-\left ( -\frac {y}{x^{2}}+1\right ) \xi -\frac {1}{x}\eta & =0\\ \eta _{x}+\left ( \frac {y}{x}+x\right ) \eta _{y}-\xi _{x}\left ( \frac {y}{x}+x\right ) -\left ( \frac {y^{2}}{x^{2}}+x^{2}+2y\right ) \xi _{y}-\left ( -\frac {y}{x^{2}}+1\right ) \xi -\frac {1}{x}\eta & =0 \end{align*}

Multiplying by \(x^{2}\) to normalize gives

\begin{equation} x^{2}\eta _{x}+\left ( yx+x^{3}\right ) \eta _{y}-\xi _{x}\left ( yx+x^{3}\right ) -\left ( y^{2}+x^{4}+2yx^{2}\right ) \xi _{y}-\left ( -y+x^{2}\right ) \xi -x\eta =0 \tag {A}\end{equation}

Equation (A) is called the determining equation. Using different ansatz can result in more solutions.

Trying ansatz

\begin{align*} \xi & =0\\ \eta & =b_{0}x \end{align*}

Plugging these into (A) and comparing coefficients to solve for the unknown gives

\begin{align*} x^{2}\left ( b_{0}\right ) -x\eta & =0\\ b_{0}x^{2}-x\left ( b_{0}x\right ) & =0\\ b_{0}x^{2}-b_{0}x^{2} & =0\\ b_{0}\left ( 0\right ) & =0 \end{align*}

So any \(b_{0}\) will work. Let \(b_{0}=1\). Hence

\begin{align*} \xi & =0\\ \eta & =x \end{align*}

Now Trying ansatz as

\begin{align*} \xi & =a_{0}+a_{1}x\\ \eta & =b_{0}+b_{1}y \end{align*}

Then \(\xi _{x}=a_{1},\xi _{y}=0,\eta _{x}=0,\eta _{y}=b_{1}\) and the determining equation (A) becomes

\begin{align*} \left ( b_{0}+b_{1}y\right ) x+\left ( a_{0}+a_{1}x\right ) \left ( x^{2}-y\right ) +b_{1}\left ( -yx-x^{3}\right ) +a_{1}\left ( yx+x^{3}\right ) & =0\\ \left ( b_{0}+b_{1}y\right ) x+\left ( a_{0}+a_{1}x\right ) \left ( x^{2}-y\right ) +\left ( b_{1}-a_{1}\right ) \left ( -yx-x^{3}\right ) & =0\\ xb_{0}-ya_{0}+x^{2}a_{0}+x^{3}\left ( 2a_{1}-b_{1}\right ) & =0 \end{align*}

Setting each coefficient to zero gives

\begin{align*} b_{0} & =0\\ a_{0} & =0\\ a_{0} & =0\\ 2a_{1}-b_{1} & =0 \end{align*}

Hence the solution is \(a_{0}=0,b_{0}=0,a_{1}=\frac {b_{1}}{2}\). Using \(b_{1}=2\) gives \(a_{1}=1\) and therefore

\begin{align*} \xi & =x\\ \eta & =2y \end{align*}

And Trying ansatz as

\begin{align*} \xi & =a_{0}+a_{1}x+a_{2}y\\ \eta & =b_{0}+b_{1}y+b_{2}x \end{align*}

Hence \(\xi _{x}=a_{1},\xi _{y}=a_{2},\eta _{x}=b_{2},\eta _{y}=b_{1}\) and the determining equation (A) becomes

\begin{align*} \left ( b_{0}+b_{1}y+b_{2}x\right ) x+\left ( a_{0}+a_{1}x+a_{2}y\right ) \left ( x^{2}-y\right ) +b_{1}\left ( -yx-x^{3}\right ) +a_{2}\left ( y^{2}+x^{4}+2yx^{2}\right ) +b_{2}\left ( -x^{2}\right ) +a_{1}\left ( yx+x^{3}\right ) & =0\\ x^{4}\left ( -a_{2}\right ) +x^{3}\left ( -2a_{1}\right ) +x^{2}y\left ( -3a_{2}\right ) +x^{3}\left ( b_{1}\right ) +x^{2}\left ( -a_{0}\right ) +y\left ( a_{0}\right ) -x\left ( b_{0}\right ) & =0 \end{align*}

Setting each coefficient to zero gives

\begin{align*} b_{0} & =0\\ a_{0} & =0\\ a_{1} & =0\\ b_{1} & =0\\ a_{2} & =0\\ b_{2} & =0 \end{align*}

This shows there is no solution for this ansatz. There are more solutions depending on what ansatz we used. We just need one to obtain the final solution. In Maple, these solutions can be found as follows

ode:=diff(y(x),x)= y(x)/x+x; 
DEtools:-symgen(ode,y(x),way=all) 
[_xi = 0, _eta = x], 
[_xi = 0, _eta = x], 
[_xi = 0, _eta = x^2 - y], 
[_xi = x, _eta = 2*y], 
[_xi = 1, _eta = y/x], 
[_xi = x^2 + y, _eta = 4*y*x], 
[_xi = x^2 - 3*y, _eta = -4*y^2/x]
 

Trying ansatz using functional form. Let \(\xi =0,\eta =f\left ( x\right ) \) then \(\xi _{x}=0,\xi _{y}=0,\eta _{x}=f^{\prime }\left ( x\right ) ,\eta _{y}=0\) and the determining equation (A) becomes

\begin{align*} x^{2}\eta _{x}+\left ( yx+x^{3}\right ) \eta _{y}-\xi _{x}\left ( yx+x^{3}\right ) -\left ( y^{2}+x^{4}+2yx^{2}\right ) \xi _{y}-\left ( -y+x^{2}\right ) \xi -x\eta & =0\\ x^{2}f^{\prime }\left ( x\right ) -xf\left ( x\right ) & =0\\ xf^{\prime }\left ( x\right ) -f\left ( x\right ) & =0 \end{align*}

This is easily solved to give \(f=cx\). Hence \(\xi =0,\eta =x\) by choosing \(c=1\). We see that this choice of ansatz was the easiest in this case, as the ode generated was linear. Let us try another and see what happens.

Trying ansatz as \(\xi =0,\eta =f\left ( y\right ) \) then \(\xi _{x}=0,\xi _{y}=0,\eta _{x}=0,\eta _{y}=f^{\prime }\left ( y\right ) \) and the determining equation (A) becomes

\begin{align*} \left ( yx+x^{3}\right ) f^{\prime }\left ( y\right ) -xf\left ( y\right ) & =0\\ \left ( y+x^{2}\right ) f^{\prime }\left ( y\right ) -f\left ( y\right ) & =0 \end{align*}

This is separable and its solution is \(f=c_{1}\left ( x^{2}+y\right ) \). Hence \(\xi =0,\eta =\left ( x^{2}+y\right ) \) by using \(c_{1}=1\). But this is not function of \(y\) only. So this choice did not work. Trying \(\left [ \xi =f\left ( x\right ) ,\eta =0\right ] ,\left [ \xi =f\left ( y\right ) ,\eta =0\right ] \) shows these also do not work.

\(\xi ,\eta \) can be checked for validity by substituting them in the PDE. Maple’s symtest command does this. These functional ansatz’s lead to an ode which have to be solved.