29.6.1 problem 147

Internal problem ID [4747]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 147
Date solved : Sunday, March 30, 2025 at 03:52: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.048 (sec). Leaf size: 19
ode=x D[y[x],x]==x^m+y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^m}{m-1}+c_1 x \]
Sympy. Time used: 0.245 (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} \]