28.1.32 problem 32

Internal problem ID [4338]
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 : 32
Date solved : Tuesday, March 04, 2025 at 06:26:54 PM
CAS classification : [_rational, [_1st_order, `_with_symmetry_[F(x),G(x)]`], [_Abel, `2nd type`, `class B`]]

\begin{align*} x^{2}+2 x +y+\left (3 x^{2} y-x \right ) y^{\prime }&=0 \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 67
ode:=x^2+2*x+y(x)+(3*x^2*y(x)-x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \frac {1-\sqrt {-12 \ln \left (x \right ) x^{2}-6 c_{1} x^{2}-6 x^{3}+1}}{3 x} \\ y \left (x \right ) &= \frac {1+\sqrt {-12 \ln \left (x \right ) x^{2}-6 c_{1} x^{2}-6 x^{3}+1}}{3 x} \\ \end{align*}
Mathematica. Time used: 0.589 (sec). Leaf size: 96
ode=(x^2+2*x+y[x])+(3*x^2*y[x]-x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {1-\sqrt {\frac {1}{x^2}} x \sqrt {-6 x^3-12 x^2 \log (x)+9 c_1 x^2+1}}{3 x} \\ y(x)\to \frac {1+\sqrt {\frac {1}{x^2}} x \sqrt {-6 x^3-12 x^2 \log (x)+9 c_1 x^2+1}}{3 x} \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + 2*x + (3*x**2*y(x) - x)*Derivative(y(x), x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out