23.1.149 problem 150

Internal problem ID [4756]
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 : 150
Date solved : Tuesday, September 30, 2025 at 08:30:36 AM
CAS classification : [_linear]

\begin{align*} x y^{\prime }&=x^{m}+y \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=x*diff(y(x),x) = x^m+y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{m}}{m -1}+c_1 x \]
Mathematica. Time used: 0.024 (sec). Leaf size: 19
ode=x D[y[x],x]==x^m+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^m}{m-1}+c_1 x \end{align*}
Sympy. Time used: 0.145 (sec). Leaf size: 19
from sympy import * 
x = symbols("x") 
m = symbols("m") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) - x**m - y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x \left (m - 1\right ) + e^{m \log {\left (x \right )}}}{m - 1} \]