29.6.14 problem 160

Internal problem ID [4760]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 160
Date solved : Sunday, March 30, 2025 at 03:53:08 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.039 (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]
 
\[ y(x)\to x \left (\frac {1}{2}+c_1 e^{-x^2}\right ) \]
Sympy. Time used: 0.288 (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 ) \]