29.8.14 problem 219

Internal problem ID [4819]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 8
Problem number : 219
Date solved : Friday, March 14, 2025 at 01:28:06 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.137 (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 \left (x \right ) = \operatorname {RootOf}\left (-\int f \left (x \right ) x^{n -1}d x +\int _{}^{\textit {\_Z}}\frac {1}{g \left (\textit {\_a} \right )}d \textit {\_a} +c_{1} \right ) x^{-n} \]
Mathematica. Time used: 0.508 (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") 
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