29.14.3 problem 382

Internal problem ID [4982]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 14
Problem number : 382
Date solved : Sunday, March 30, 2025 at 04:27:54 AM
CAS classification : [_Riccati]

\begin{align*} x^{n} y^{\prime }&=x^{2 n -1}-y^{2} \end{align*}

Maple. Time used: 0.003 (sec). Leaf size: 80
ode:=x^n*diff(y(x),x) = x^(2*n-1)-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (\operatorname {BesselK}\left (n , 2 \sqrt {x}\right ) c_1 -\operatorname {BesselI}\left (n , 2 \sqrt {x}\right )\right ) x^{n}}{-\operatorname {BesselI}\left (n +1, 2 \sqrt {x}\right ) \sqrt {x}-\operatorname {BesselK}\left (n +1, 2 \sqrt {x}\right ) \sqrt {x}\, c_1 +n \left (\operatorname {BesselK}\left (n , 2 \sqrt {x}\right ) c_1 -\operatorname {BesselI}\left (n , 2 \sqrt {x}\right )\right )} \]
Mathematica. Time used: 0.383 (sec). Leaf size: 293
ode=x^n D[y[x],x]==x^(2 n -1)-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x^{n-1} \left (-\left ((n-1) \operatorname {Gamma}(2-n) \operatorname {BesselI}\left (1-n,2 \sqrt {x}\right )\right )+\sqrt {x} \operatorname {Gamma}(2-n) \operatorname {BesselI}\left (2-n,2 \sqrt {x}\right )+\sqrt {x} \operatorname {Gamma}(2-n) \operatorname {BesselI}\left (-n,2 \sqrt {x}\right )-c_1 (-1)^n \sqrt {x} \operatorname {Gamma}(n) \operatorname {BesselI}\left (n-2,2 \sqrt {x}\right )-c_1 (-1)^n \operatorname {Gamma}(n) \operatorname {BesselI}\left (n-1,2 \sqrt {x}\right )+c_1 (-1)^n n \operatorname {Gamma}(n) \operatorname {BesselI}\left (n-1,2 \sqrt {x}\right )-c_1 (-1)^n \sqrt {x} \operatorname {Gamma}(n) \operatorname {BesselI}\left (n,2 \sqrt {x}\right )\right )}{2 \left (\operatorname {Gamma}(2-n) \operatorname {BesselI}\left (1-n,2 \sqrt {x}\right )-c_1 (-1)^n \operatorname {Gamma}(n) \operatorname {BesselI}\left (n-1,2 \sqrt {x}\right )\right )} \\ y(x)\to \frac {x^{n-1} \left (\sqrt {x} \operatorname {BesselI}\left (n-2,2 \sqrt {x}\right )-(n-1) \operatorname {BesselI}\left (n-1,2 \sqrt {x}\right )+\sqrt {x} \operatorname {BesselI}\left (n,2 \sqrt {x}\right )\right )}{2 \operatorname {BesselI}\left (n-1,2 \sqrt {x}\right )} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x**n*Derivative(y(x), x) - x**(2*n - 1) + y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (x**(2*n - 1) - y(x)**2)/x**n cannot be solved by the factorable group method