85.24.3 problem 3

Internal problem ID [22580]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 57
Problem number : 3
Date solved : Thursday, October 02, 2025 at 08:52:11 PM
CAS classification : [[_homogeneous, `class D`], _rational, _Riccati]

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