29.14.6 problem 386

Internal problem ID [4985]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 14
Problem number : 386
Date solved : Tuesday, March 04, 2025 at 07:40:18 PM
CAS classification : [_rational, _Riccati]

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

Maple. Time used: 0.018 (sec). Leaf size: 34
ode:=x^n*diff(y(x),x) = x^(n-1)*(a*x^(2*n)+n*y(x)-b*y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {\tanh \left (\frac {x^{n} \sqrt {a}\, \sqrt {b}+i c_{1} n}{n}\right ) \sqrt {a}\, x^{n}}{\sqrt {b}} \]
Mathematica. Time used: 0.32 (sec). Leaf size: 153
ode=x^n D[y[x],x]==x^(n-1)(a x^(2 n)+n y[x]-b y[x]^2); 
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(x**n*Derivative(y(x), x) - x**(n - 1)*(a*x**(2*n) - b*y(x)**2 + n*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (a*x**(3*n - 1) - b*x**(n - 1)*y(x)**2 + n*x**(n - 1)*y(x))/x**n cannot be solved by the factorable group method