29.8.15 problem 220

Internal problem ID [4820]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 220
Date solved : Tuesday, March 04, 2025 at 07:21:08 PM
CAS classification : [[_homogeneous, `class G`]]

\begin{align*} x y^{\prime }&=y f \left (x^{m} y^{n}\right ) \end{align*}

Maple. Time used: 0.122 (sec). Leaf size: 39
ode:=x*diff(y(x),x) = y(x)*f(x^m*y(x)^n); 
dsolve(ode,y(x), singsol=all);
 
\[ \int _{\textit {\_b}}^{y \left (x \right )}\frac {1}{\left (f \left (x^{m} \textit {\_a}^{n}\right ) n +m \right ) \textit {\_a}}d \textit {\_a} -\frac {\ln \left (x \right )}{n}-c_{1} = 0 \]
Mathematica. Time used: 0.374 (sec). Leaf size: 186
ode=x D[y[x],x]==y[x] f[x^m y[x]^n] ; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{y(x)}\left (-\frac {n}{\left (m+n f\left (x^m K[2]^n\right )\right ) K[2]}-\int _1^x\left (\frac {n^2 K[1]^{m-1} K[2]^{n-1} f''\left (K[1]^m K[2]^n\right )}{m+n f\left (K[1]^m K[2]^n\right )}-\frac {n^3 f\left (K[1]^m K[2]^n\right ) K[1]^{m-1} K[2]^{n-1} f''\left (K[1]^m K[2]^n\right )}{\left (m+n f\left (K[1]^m K[2]^n\right )\right )^2}\right )dK[1]\right )dK[2]+\int _1^x\frac {n f\left (K[1]^m y(x)^n\right )}{\left (m+n f\left (K[1]^m y(x)^n\right )\right ) K[1]}dK[1]=c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
m = symbols("m") 
n = symbols("n") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - f(x**m*y(x)**n)*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - f(x**m*y(x)**n)*y(x)/x cannot be solved by the factorable group method