23.1.226 problem 222

Internal problem ID [4833]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Part II. Chapter 1. THE DIFFERENTIAL EQUATION IS OF FIRST ORDER AND OF FIRST DEGREE, page 223
Problem number : 222
Date solved : Sunday, October 12, 2025 at 01:18:19 AM
CAS classification : [[_1st_order, `_with_symmetry_[F(x),G(x)*y+H(x)]`]]

\begin{align*} x y^{\prime }+n y&=f \left (x \right ) g \left (x^{n} y\right ) \end{align*}
Maple. Time used: 0.039 (sec). Leaf size: 33
ode:=x*diff(y(x),x)+n*y(x) = f(x)*g(x^n*y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \operatorname {RootOf}\left (-\int x^{n -1} f \left (x \right )d x +\int _{}^{\textit {\_Z}}\frac {1}{g \left (\textit {\_a} \right )}d \textit {\_a} +c_1 \right ) x^{-n} \]
Mathematica. Time used: 0.308 (sec). Leaf size: 41
ode=x*D[y[x],x]+ n*y[x]==f[x]*g[x^n*y[x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{x^n y(x)}\frac {1}{g(K[1])}dK[1]=\int _1^xf(K[2]) K[2]^{n-1}dK[2]+c_1,y(x)\right ] \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
f = Function("f") 
g = Function("g") 
ode = Eq(n*y(x) + x*Derivative(y(x), x) - f(x)*g(x**n*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out