29.5.28 problem 145

Internal problem ID [4745]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 5
Problem number : 145
Date solved : Sunday, March 30, 2025 at 03:52:32 AM
CAS classification : [_linear]

\begin{align*} x y^{\prime }&=x^{3}-y \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 16
ode:=x*diff(y(x),x) = x^3-y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{4}+4 c_1}{4 x} \]
Mathematica. Time used: 0.029 (sec). Leaf size: 19
ode=x D[y[x],x]==x^3-y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {x^3}{4}+\frac {c_1}{x} \]
Sympy. Time used: 0.184 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + x*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \frac {x^{4}}{4}}{x} \]