1.4 On the choice of which method to use when solving an ode
When a given ode can be solved using a number of different methods, we need to decide
which is the best method to use. In general, it is best to avoid having to solve for the
derivative. In other words, for ode’s which are first order and non-linear in \(y^{\prime }\) to make
progress, we have to first solve for the derivative. But it is also possible to solve
the ode as is without solving for the derivative. Here is an example. Given this
ode
\begin{equation} y=x+3\ln \left ( y^{\prime }\right ) \tag {1}\end{equation}
This is non-linear in the derivative. Lets solve this as separable and then as dAlembert. As
separable, we have to first solve for \(y^{\prime }\) which gives
\[ \ln \left ( y^{\prime }\right ) =\frac {y}{3}-\frac {x}{3}\]
Taking exponential of both sides
gives
\begin{align*} y^{\prime } & =e^{\left ( \frac {y}{3}-\frac {x}{3}\right ) }\\ y^{\prime } & =e^{\frac {y}{3}}e^{\frac {-x}{3}}\end{align*}
Which is now separable. Integrating gives
\begin{align} \int e^{\frac {-y}{3}}dy & =\int e^{\frac {-x}{3}}dx\nonumber \\ -3e^{\frac {-y}{3}} & =-3e^{\frac {-x}{3}}+c\nonumber \\ e^{\frac {-y}{3}} & =e^{\frac {-x}{3}}-\frac {c}{3}\nonumber \\ \frac {-y}{3} & =\ln \left ( e^{\frac {-x}{3}}-\frac {c}{3}\right ) \nonumber \\ y & =-3\ln \left ( e^{\frac {-x}{3}}-\frac {c}{3}\right ) \tag {2}\end{align}
This solution as it stands could not be verified by Maple as valid solution to the ode unless
we assume that \(e^{\frac {-x}{3}}-\frac {c}{3}>0\) and also assuming \(x>0\). Only then Maple odetest verifies the solution as valid.
Now lets see what happens if we solve the same ode above as dAlembert using original
form as is. Eq. (1) is
\begin{equation} y=x+3\ln \left ( p\right ) \tag {3}\end{equation}
Where
\(p=y^{\prime }\). Comparing to dAlembert for
\(y=xf+g\) shows that
\(f=1,g=3\ln \left ( p\right ) \). Taking derivative
of the above w.r.t.
\(x\) gives
\begin{align*} y^{\prime } & =f+xf^{\prime }\frac {dp}{dx}+g^{\prime }\frac {dp}{dx}\\ p & =f+\frac {dp}{dx}\left ( xf^{\prime }+g^{\prime }\right ) \\ p-f & =\frac {dp}{dx}\left ( xf^{\prime }+g^{\prime }\right ) \end{align*}
But \(f=1,g=3\ln p\), hence \(f^{\prime }\left ( p\right ) =0,g^{\prime }\left ( p\right ) =\frac {3}{p}\). The above becomes
\begin{equation} p-1=\frac {dp}{dx}\left ( \frac {3}{p}\right ) \tag {4}\end{equation}
Singular solution when
\(\frac {dp}{dx}=0\) which gives
\(p=1\). Hence (3) becomes
\(y=x\). This is the singular solution. General solution is when
\(\frac {dp}{dx}\neq 0\) in (4). This gives the ode
\[ \frac {dp}{dx}=\frac {1}{3}p\left ( p-1\right ) \]
Which
is quadrature. Solving for
\(p\) gives
\[ p=\frac {1}{1+ce^{\frac {x}{3}}}\]
Substituting this into (3) gives
\[ y=x+3\ln \left ( \frac {1}{1+ce^{\frac {x}{3}}}\right ) \]
This solution was verified
as is in Maple with no assumptions. We see now the difference in the solution
solutions
\begin{align*} y_{sep} & =-3\ln \left ( e^{\frac {-x}{3}}-\frac {c}{3}\right ) \\ y_{dAlembert} & =x+3\ln \left ( \frac {1}{1+ce^{\frac {x}{3}}}\right ) \end{align*}
The difference is that for verification, the separable solution requires giving assumptions
while the dAlembert does not. In this case, the dAlembert is preferable.