12.16 problem 335

12.16.1 Solving as riccati ode
12.16.2 Maple step by step solution

Internal problem ID [3591]
Internal file name [OUTPUT/3084_Sunday_June_05_2022_08_51_38_AM_45270183/index.tex]

Book: Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section: Various 12
Problem number: 335.
ODE order: 1.
ODE degree: 1.

The type(s) of ODE detected by this program : "riccati"

Maple gives the following as the ode type

[_rational, _Riccati]

\[ \boxed {2 x \left (1-x \right ) y^{\prime }+\left (1-x \right ) y^{2}=-x} \]

12.16.1 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= -\frac {x \,y^{2}-y^{2}-x}{2 x \left (x -1\right )} \end {align*}

This is a Riccati ODE. Comparing the ODE to solve \[ y' = -\frac {y^{2}}{2 \left (x -1\right )}+\frac {y^{2}}{2 x \left (x -1\right )}+\frac {1}{-2+2 x} \] With Riccati ODE standard form \[ y' = f_0(x)+ f_1(x)y+f_2(x)y^{2} \] Shows that \(f_0(x)=\frac {1}{-2+2 x}\), \(f_1(x)=0\) and \(f_2(x)=-\frac {1}{2 x}\). Let \begin {align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{-\frac {u}{2 x}} \tag {1} \end {align*}

Using the above substitution in the given ODE results (after some simplification)in a second order ODE to solve for \(u(x)\) which is \begin {align*} f_2 u''(x) -\left ( f_2' + f_1 f_2 \right ) u'(x) + f_2^2 f_0 u(x) &= 0 \tag {2} \end {align*}

But \begin {align*} f_2' &=\frac {1}{2 x^{2}}\\ f_1 f_2 &=0\\ f_2^2 f_0 &=\frac {1}{8 x^{2} \left (x -1\right )} \end {align*}

Substituting the above terms back in equation (2) gives \begin {align*} -\frac {u^{\prime \prime }\left (x \right )}{2 x}-\frac {u^{\prime }\left (x \right )}{2 x^{2}}+\frac {u \left (x \right )}{8 x^{2} \left (x -1\right )} &=0 \end {align*}

Solving the above ODE (this ode solved using Maple, not this program), gives

\[ u \left (x \right ) = \frac {\sqrt {x -1}\, \left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{1} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{2} \right )}{\sqrt {x}} \] The above shows that \[ u^{\prime }\left (x \right ) = \frac {\left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) c_{1} +c_{2} \left (\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right )}{4 \sqrt {x}\, \sqrt {x -1}} \] Using the above in (1) gives the solution \[ y = \frac {\left (\left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) c_{1} +c_{2} \left (\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right )\right ) x}{2 \left (x -1\right ) \left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{1} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{2} \right )} \] Dividing both numerator and denominator by \(c_{1}\) gives, after renaming the constant \(\frac {c_{2}}{c_{1}}=c_{3}\) the following solution

\[ y = \frac {\left (\left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) x}{2 \left (x -1\right ) \left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )\right )} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {\left (\left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) x}{2 \left (x -1\right ) \left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )\right )} \\ \end{align*}

Figure 497: Slope field plot

Verification of solutions

\[ y = \frac {\left (\left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )+\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {x -2}{x}\right )\right ) x}{2 \left (x -1\right ) \left (\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right ) c_{3} +\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {x -2}{x}\right )\right )} \] Verified OK.

12.16.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & 2 x \left (1-x \right ) y^{\prime }+\left (1-x \right ) y^{2}=-x \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & y^{\prime } \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & y^{\prime }=-\frac {x +\left (1-x \right ) y^{2}}{2 x \left (1-x \right )} \end {array} \]

Maple trace

`Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
trying inverse linear 
trying homogeneous types: 
trying Chini 
differential order: 1; looking for linear symmetries 
trying exact 
Looking for potential symmetries 
trying Riccati 
trying Riccati sub-methods: 
      -> Trying a Liouvillian solution using Kovacics algorithm 
      <- No Liouvillian solutions exists 
      -> hyper3: Equivalence to 2F1, 1F1 or 0F1 under a power @ Moebius 
      <- hyper3 successful: received ODE is equivalent to the 2F1 ODE 
   <- Abel AIR successful: ODE belongs to the 2F1 2-parameter class`
 

Solution by Maple

Time used: 0.093 (sec). Leaf size: 97

dsolve(2*x*(1-x)*diff(y(x),x)+x+(1-x)*y(x)^2 = 0,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {x \left (\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {2-x}{x}\right ) c_{1} -\operatorname {LegendreQ}\left (\frac {1}{2}, 1, \frac {2-x}{x}\right ) c_{1} +\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {2-x}{x}\right )-\operatorname {LegendreP}\left (\frac {1}{2}, 1, \frac {2-x}{x}\right )\right )}{2 \left (\operatorname {LegendreQ}\left (-\frac {1}{2}, 1, \frac {2-x}{x}\right ) c_{1} +\operatorname {LegendreP}\left (-\frac {1}{2}, 1, \frac {2-x}{x}\right )\right ) \left (x -1\right )} \]

Solution by Mathematica

Time used: 0.806 (sec). Leaf size: 77

DSolve[2 x(1-x)y'[x]+x+(1-x)y[x]^2==0,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to -\frac {2 \left (\pi G_{2,2}^{2,0}\left (x\left | \begin {array}{c} \frac {1}{2},\frac {3}{2} \\ 0,1 \\ \end {array} \right .\right )+c_1 (\operatorname {EllipticK}(x)-\operatorname {EllipticE}(x))\right )}{\pi G_{2,2}^{2,0}\left (x\left | \begin {array}{c} \frac {1}{2},\frac {3}{2} \\ 0,0 \\ \end {array} \right .\right )+2 c_1 \operatorname {EllipticE}(x)} \\ y(x)\to 1-\frac {\operatorname {EllipticK}(x)}{\operatorname {EllipticE}(x)} \\ \end{align*}