2.2 problem 2

2.2.1 Solving as riccati ode
2.2.2 Maple step by step solution

Internal problem ID [10331]
Internal file name [OUTPUT/9279_Monday_June_06_2022_01_45_24_PM_3663866/index.tex]

Book: Handbook of exact solutions for ordinary differential equations. By Polyanin and Zaitsev. Second edition
Section: Chapter 1, section 1.2. Riccati Equation. 1.2.2. Equations Containing Power Functions
Problem number: 2.
ODE order: 1.
ODE degree: 1.

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

Maple gives the following as the ode type

[_Riccati]

\[ \boxed {y^{\prime }-y^{2}=-x^{2} a^{2}+3 a} \]

2.2.1 Solving as riccati ode

In canonical form the ODE is \begin {align*} y' &= F(x,y)\\ &= -x^{2} a^{2}+y^{2}+3 a \end {align*}

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

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

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

\[ u \left (x \right ) = x \left (\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {-a}\, \sqrt {\pi }\, c_{2} +c_{1} \right ) {\mathrm e}^{-\frac {x^{2} a}{2}}+c_{2} {\mathrm e}^{\frac {x^{2} a}{2}} \] The above shows that \[ u^{\prime }\left (x \right ) = \left (c_{2} \sqrt {\pi }\, \left (x^{2} \left (-a \right )^{\frac {3}{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (x \sqrt {-a}\right )-c_{1} a \,x^{2}+c_{1} \right ) {\mathrm e}^{-\frac {x^{2} a}{2}}-c_{2} x a \,{\mathrm e}^{\frac {x^{2} a}{2}} \] Using the above in (1) gives the solution \[ y = -\frac {\left (c_{2} \sqrt {\pi }\, \left (x^{2} \left (-a \right )^{\frac {3}{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (x \sqrt {-a}\right )-c_{1} a \,x^{2}+c_{1} \right ) {\mathrm e}^{-\frac {x^{2} a}{2}}-c_{2} x a \,{\mathrm e}^{\frac {x^{2} a}{2}}}{x \left (\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {-a}\, \sqrt {\pi }\, c_{2} +c_{1} \right ) {\mathrm e}^{-\frac {x^{2} a}{2}}+c_{2} {\mathrm e}^{\frac {x^{2} a}{2}}} \] 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 {x a \,{\mathrm e}^{x^{2} a}-\sqrt {\pi }\, \left (x^{2} \left (-a \right )^{\frac {3}{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (x \sqrt {-a}\right )+c_{3} \left (x^{2} a -1\right )}{\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {-a}\, \sqrt {\pi }\, x +{\mathrm e}^{x^{2} a}+c_{3} x} \]

Summary

The solution(s) found are the following \begin{align*} \tag{1} y &= \frac {x a \,{\mathrm e}^{x^{2} a}-\sqrt {\pi }\, \left (x^{2} \left (-a \right )^{\frac {3}{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (x \sqrt {-a}\right )+c_{3} \left (x^{2} a -1\right )}{\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {-a}\, \sqrt {\pi }\, x +{\mathrm e}^{x^{2} a}+c_{3} x} \\ \end{align*}

Verification of solutions

\[ y = \frac {x a \,{\mathrm e}^{x^{2} a}-\sqrt {\pi }\, \left (x^{2} \left (-a \right )^{\frac {3}{2}}+\sqrt {-a}\right ) \operatorname {erf}\left (x \sqrt {-a}\right )+c_{3} \left (x^{2} a -1\right )}{\operatorname {erf}\left (x \sqrt {-a}\right ) \sqrt {-a}\, \sqrt {\pi }\, x +{\mathrm e}^{x^{2} a}+c_{3} x} \] Verified OK.

2.2.2 Maple step by step solution

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & y^{\prime }-y^{2}=-x^{2} a^{2}+3 a \\ \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 }=y^{2}-x^{2} a^{2}+3 a \end {array} \]

Maple trace Kovacic algorithm successful

`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 Special 
trying Riccati sub-methods: 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE`, diff(diff(y(x), x), x) = (a^2*x^2-3*a)*y(x), y(x)`      *** Sublevel 2 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a quadrature 
      checking if the LODE has constant coefficients 
      checking if the LODE is of Euler type 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Trying a Liouvillian solution using Kovacics algorithm 
         A Liouvillian solution exists 
         Reducible group (found an exponential solution) 
         Group is reducible, not completely reducible 
      <- Kovacics algorithm successful 
   <- Riccati to 2nd Order successful`
 

Solution by Maple

Time used: 0.0 (sec). Leaf size: 82

dsolve(diff(y(x),x)=y(x)^2-a^2*x^2+3*a,y(x), singsol=all)
 

\[ y \left (x \right ) = \frac {{\mathrm e}^{a \,x^{2}} c_{1} a x -c_{1} \sqrt {\pi }\, \left (\left (-a \right )^{\frac {3}{2}} x^{2}+\sqrt {-a}\right ) \operatorname {erf}\left (\sqrt {-a}\, x \right )+a \,x^{2}-1}{\sqrt {\pi }\, \sqrt {-a}\, \operatorname {erf}\left (\sqrt {-a}\, x \right ) c_{1} x +{\mathrm e}^{a \,x^{2}} c_{1} +x} \]

Solution by Mathematica

Time used: 0.79 (sec). Leaf size: 192

DSolve[y'[x]==y[x]^2-a^2*x^2+3*a,y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to \frac {a x \operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+i \sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (-1,i \sqrt {2} \sqrt {a} x\right )-a c_1 x \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )+\sqrt {2} \sqrt {a} c_1 \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (-2,i \sqrt {2} \sqrt {a} x\right )+c_1 \operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )} \\ y(x)\to \frac {\sqrt {2} \sqrt {a} \operatorname {ParabolicCylinderD}\left (2,\sqrt {2} \sqrt {a} x\right )}{\operatorname {ParabolicCylinderD}\left (1,\sqrt {2} \sqrt {a} x\right )}-a x \\ \end{align*}