29.6.22 problem 168

Internal problem ID [4768]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 168
Date solved : Sunday, March 30, 2025 at 03:53:35 AM
CAS classification : [_rational, _Riccati]

\begin{align*} x y^{\prime }&=a \,x^{2 n}+\left (n +b y\right ) y \end{align*}

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