29.7.6 problem 181

Internal problem ID [4781]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 7
Problem number : 181
Date solved : Sunday, March 30, 2025 at 03:54:17 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }+x^{m}+\frac {\left (n -m \right ) y}{2}+x^{n} y^{2}&=0 \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 39
ode:=x*diff(y(x),x)+x^m+1/2*(n-m)*y(x)+x^n*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\tan \left (\frac {2 x^{\frac {m}{2}+\frac {n}{2}}+c_1 \left (m +n \right )}{m +n}\right ) x^{\frac {m}{2}-\frac {n}{2}} \]
Mathematica. Time used: 0.617 (sec). Leaf size: 40
ode=x D[y[x],x]+x^m+((n-m)/2) y[x]+x^n y[x]^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -x^{\frac {m-n}{2}} \tan \left (\frac {2 x^{\frac {m+n}{2}}}{m+n}-c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + x**m + x**n*y(x)**2 + (-m + n)*y(x)/2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (m*y(x)/2 - n*y(x)/2 - x**m - x**n*y(x)**2)/x cannot be solved by the factorable group method