29.12.25 problem 344

Internal problem ID [4944]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 12
Problem number : 344
Date solved : Sunday, March 30, 2025 at 04:17:28 AM
CAS classification : [_linear]

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

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