28.1.106 problem 129

Internal problem ID [4412]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 2. First-Order and Simple Higher-Order Differential Equations. Page 78
Problem number : 129
Date solved : Tuesday, March 04, 2025 at 06:40:21 PM
CAS classification : [_separable]

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

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