23.1.163 problem 163

Internal problem ID [4770]
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 : 163
Date solved : Tuesday, September 30, 2025 at 08:31:00 AM
CAS classification : [_linear]

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