2.1.37 Problem 38

2.1.37.1 Solved using first_order_ode_riccati
2.1.37.2 Maple
2.1.37.3 Mathematica
2.1.37.4 Sympy

Internal problem ID [10023]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 38
Date solved : Monday, December 29, 2025 at 08:52:17 PM
CAS classification : [_rational, _Riccati]

2.1.37.1 Solved using first_order_ode_riccati

2.443 (sec)

Entering first order ode riccati solver

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

This is a Riccati ODE. Comparing the ODE to solve

\[ y' = \textit {the\_rhs} \]
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}{x^{{1}/{3}}}\), \(f_1(x)=\frac {1}{x}\) and \(f_2(x)=-\frac {1}{x}\). Let
\begin{align*} y &= \frac {-u'}{f_2 u} \\ &= \frac {-u'}{-\frac {u}{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}{x^{2}}\\ f_1 f_2 &=-\frac {1}{x^{2}}\\ f_2^2 f_0 &=\frac {1}{x^{{7}/{3}}} \end{align*}

Substituting the above terms back in equation (2) gives

\[ -\frac {u^{\prime \prime }\left (x \right )}{x}+\frac {u \left (x \right )}{x^{{7}/{3}}} = 0 \]
Entering second order bessel ode solverWriting the ode as
\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )-x^{{2}/{3}} u = 0\tag {1} \end{align*}

Bessel ode has the form

\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (\frac {d u}{d x}\right ) x +\left (-n^{2}+x^{2}\right ) u = 0\tag {2} \end{align*}

The generalized form of Bessel ode is given by Bowman (1958) as the following

\begin{align*} x^{2} \left (\frac {d^{2}u}{d x^{2}}\right )+\left (1-2 \alpha \right ) x \left (\frac {d u}{d x}\right )+\left (\beta ^{2} \gamma ^{2} x^{2 \gamma }-n^{2} \gamma ^{2}+\alpha ^{2}\right ) u = 0\tag {3} \end{align*}

With the standard solution

\begin{align*} u&=x^{\alpha } \left (c_1 \operatorname {BesselJ}\left (n , \beta \,x^{\gamma }\right )+c_2 \operatorname {BesselY}\left (n , \beta \,x^{\gamma }\right )\right )\tag {4} \end{align*}

Comparing (3) to (1) and solving for \(\alpha ,\beta ,n,\gamma \) gives

\begin{align*} \alpha &= {\frac {1}{2}}\\ \beta &= 3 i\\ n &= {\frac {3}{2}}\\ \gamma &= {\frac {1}{3}} \end{align*}

Substituting all the above into (4) gives the solution as

\begin{align*} u = -\frac {c_1 \,x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_2 \,x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}} \end{align*}

Taking derivative gives

\begin{equation} \tag{4} u^{\prime }\left (x \right ) = -\frac {c_1 \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {c_1 \sqrt {2}\, \sqrt {3}\, \sinh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}+\frac {i c_1 \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}}-\frac {i c_2 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_2 \sqrt {2}\, \sqrt {3}\, \cosh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {c_2 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}} \end{equation}
Substituting equations (3,4) into (1) results in
\begin{align*} y &= \frac {-u'}{f_2 u} \\ y &= \frac {-u'}{-\frac {u}{x}} \\ y &= \frac {\left (-\frac {c_1 \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {c_1 \sqrt {2}\, \sqrt {3}\, \sinh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}+\frac {i c_1 \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}}-\frac {i c_2 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_2 \sqrt {2}\, \sqrt {3}\, \cosh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {c_2 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}}\right ) x}{-\frac {c_1 \,x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_2 \,x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}} \\ \end{align*}
Doing change of constants, the above solution becomes
\[ y = \frac {\left (-\frac {\sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {\sqrt {2}\, \sqrt {3}\, \sinh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}+\frac {i \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}}-\frac {i c_3 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 x^{{5}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_3 \sqrt {2}\, \sqrt {3}\, \cosh \left (3 x^{{1}/{3}}\right )}{3 x^{{1}/{6}} \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {c_3 \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{54 \sqrt {x}\, \sqrt {\pi }\, \left (i x^{{1}/{3}}\right )^{{3}/{2}}}\right ) x}{-\frac {x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \cosh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\sinh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}-\frac {i c_3 \,x^{{1}/{6}} \sqrt {2}\, \sqrt {3}\, \left (3 \sinh \left (3 x^{{1}/{3}}\right ) x^{{1}/{3}}-\cosh \left (3 x^{{1}/{3}}\right )\right )}{9 \sqrt {\pi }\, \sqrt {i x^{{1}/{3}}}}} \]
Simplifying the above gives
\begin{align*} y &= \frac {3 x^{{2}/{3}} \left (\sinh \left (3 x^{{1}/{3}}\right )+i c_3 \cosh \left (3 x^{{1}/{3}}\right )\right )}{\left (3 i x^{{1}/{3}} c_3 -1\right ) \sinh \left (3 x^{{1}/{3}}\right )-\cosh \left (3 x^{{1}/{3}}\right ) \left (i c_3 -3 x^{{1}/{3}}\right )} \\ \end{align*}
Figure 2.96: Slope field \(y^{\prime } x -y+y^{2} = x^{{2}/{3}}\)

Summary of solutions found

\begin{align*} y &= \frac {3 x^{{2}/{3}} \left (\sinh \left (3 x^{{1}/{3}}\right )+i c_3 \cosh \left (3 x^{{1}/{3}}\right )\right )}{\left (3 i x^{{1}/{3}} c_3 -1\right ) \sinh \left (3 x^{{1}/{3}}\right )-\cosh \left (3 x^{{1}/{3}}\right ) \left (i c_3 -3 x^{{1}/{3}}\right )} \\ \end{align*}
2.1.37.2 Maple. Time used: 0.003 (sec). Leaf size: 72
ode:=x*diff(y(x),x)-y(x)+y(x)^2 = x^(2/3); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (c_1 {| 3 x^{{1}/{3}}-1|} {\mathrm e}^{6 x^{{1}/{3}}}+c_1 \,{\mathrm e}^{6 x^{{1}/{3}}} \operatorname {abs}\left (1, 3 x^{{1}/{3}}-1\right )-3 x^{{1}/{3}}\right ) x^{{1}/{3}}}{c_1 {| 3 x^{{1}/{3}}-1|} {\mathrm e}^{6 x^{{1}/{3}}}+3 x^{{1}/{3}}+1} \]

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 Riccati_symmetries 
   trying Riccati to 2nd Order 
   -> Calling odsolve with the ODE, diff(diff(y(x),x),x) = 1/x^(4/3)*y(x), y(x) 
      *** Sublevel 2 *** 
      Methods for second order ODEs: 
      --- Trying classification methods --- 
      trying a symmetry of the form [xi=0, eta=F(x)] 
      checking if the LODE is missing y 
      -> Trying an equivalence, under non-integer power transformations, 
         to LODEs admitting Liouvillian solutions. 
         -> Trying a Liouvillian solution using Kovacics algorithm 
            A Liouvillian solution exists 
            Group is reducible or imprimitive 
         <- Kovacics algorithm successful 
      <- Equivalence, under non-integer power transformations successful 
   <- Riccati to 2nd Order successful
 

Maple step by step

\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & x \left (\frac {d}{d x}y \left (x \right )\right )-y \left (x \right )+y \left (x \right )^{2}=x^{{2}/{3}} \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d x}y \left (x \right ) \\ \bullet & {} & \textrm {Solve for the highest derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d x}y \left (x \right )=\frac {y \left (x \right )-y \left (x \right )^{2}+x^{{2}/{3}}}{x} \end {array} \]
2.1.37.3 Mathematica. Time used: 0.12 (sec). Leaf size: 131
ode=x*D[y[x],x]-y[x]+y[x]^2==x^(2/3); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {3 x^{2/3} \left (c_1 \cosh \left (3 \sqrt [3]{x}\right )-i \sinh \left (3 \sqrt [3]{x}\right )\right )}{\left (-3 i \sqrt [3]{x}-c_1\right ) \cosh \left (3 \sqrt [3]{x}\right )+\left (3 c_1 \sqrt [3]{x}+i\right ) \sinh \left (3 \sqrt [3]{x}\right )}\\ y(x)&\to \frac {3 x^{2/3} \cosh \left (3 \sqrt [3]{x}\right )}{3 \sqrt [3]{x} \sinh \left (3 \sqrt [3]{x}\right )-\cosh \left (3 \sqrt [3]{x}\right )} \end{align*}
2.1.37.4 Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**(2/3) + x*Derivative(y(x), x) + y(x)**2 - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) + y(x)**2/x - y(x)/x - 1/x**(1/3) cannot be solved by the factorable group method